405 Method Not Allowed
This URL does not accept that HTTP method
Seen in APIs, web servers, frameworks
The resource exists, but the server does not allow the method used, such as POST or DELETE.
Common causes
- The route only defines a handler for other methods (e.g. GET but not POST).
- A POST sent to a static file, which most web servers only serve for GET and HEAD.
- A redirect turned the request into a different method or URL.
How to fix it
- Check the Allow response header for the methods the URL accepts.
- Add a handler for the method in the application route.
- Point form actions and API calls at the application endpoint, not a static path.
Got a different message? Paste it into the error explainer.
Related errors
- 502 Bad Gateway · The proxy got a bad response from the server behind it
- 504 Gateway Timeout · The server behind the proxy took too long
- Error 520: Web server is returning an unknown error · Cloudflare got an empty or invalid response
- 429 Too Many Requests · You've hit a rate limit
- 400 Bad Request · The server could not understand the request
- 401 Unauthorized · The request needs valid credentials
- 403 Forbidden · The server refuses to allow this request
- 404 Not Found · Nothing exists at this URL
- 410 Gone · The resource was removed on purpose
- 414 Request-URI Too Large · The URL is longer than the server accepts
- 500 Internal Server Error · The application hit an error it did not handle
- 400 Bad Request: The plain HTTP request was sent to HTTPS port · Plain HTTP was sent to a port that expects TLS