HTTP 405 Method Not Allowed — What It Means
What HTTP status code 405 Method Not Allowed means, when servers return it, and how to handle it correctly.
Published September 23, 2026
HTTP 405 Method Not Allowed means the URL exists but does not support the HTTP method used. The response must include an Allow header listing valid methods.
What it means
For example sending POST to an endpoint that only accepts GET.
Common causes: Wrong method (POST vs GET); Route defined for different verbs; CORS or proxy blocking methods.
On the wire
DELETE /users HTTP/1.1
HTTP/1.1 405 Method Not Allowed
Allow: GET, POST
Practical examples
Test it from the shell
curl -i https://example.com/path # look for HTTP 405Handling 405 in code or config
res.status(405).set('Allow','GET, POST').end()How to fix it
Use a method listed in the Allow header; Define the route for the needed method; Check server config limits.
1. Reproduce: curl -i <url>
2. Confirm the status is 405
3. Apply the fix above and re-testCommon mistakes
- Use a method listed in the Allow header
- Define the route for the needed method
- Ignoring the response headers that explain the details.
Key takeaways
- 405 means Method Not Allowed.
- HTTP 405 Method Not Allowed means the URL exists but does not support the HTTP method used.
- Read the response headers and logs for the exact cause.
FAQ
405 vs 404?
404 means no such URL; 405 means the URL exists but not for that method.
Is 405 a client or server error?
It is a client error status code, in the 4xx class.