HTTP 405 Method Not Allowed — Meaning, Causes & How to Fix
The request method is known by the server but is not supported by the target resource.
- Code
- 405
- Name
- Method Not Allowed
- Class
- 4xx Client Error
- Specification
- RFC 9110 §15.5.6
- Cacheable by default
- Yes — heuristically cacheable by default
What HTTP 405 means
405 Method Not Allowed means the URL exists but does not accept this HTTP method — for example a POST to a read-only page. The server must send an Allow header listing the methods it does accept.
Common causes
- Sending POST to an endpoint that only supports GET (or the reverse).
- A static file server receiving PUT/DELETE.
- A missing route for that method in the framework.
How to fix it
For site owners
- Include the
Allowheader. - Register the route for the method, or fix the client calling it.
For visitors & developers
- Check the API docs for the correct method and URL (a missing trailing slash can route to a different handler).
SEO impact
Not relevant for normal pages: crawlers use GET. If a page returns 405 to GET, it cannot be indexed.
Example 405 response
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD
Content-Length: 0
Related status codes
Check or look up another code
Search and filter every code in the HTTP Status Codes tool, browse the full list by class, or read HTTP status codes explained: the complete developer guide.
Open HTTP Status Codes tool →All status codesFrequently asked questions
What does HTTP 405 mean?
HTTP 405 Method Not Allowed is a 4xx Client Error status code. The request method is known by the server but is not supported by the target resource.
What is the difference between 405 and 501?
405: the server knows the method but this resource does not allow it. 501: the server does not support the method at all.
Which specification defines 405?
It is defined in RFC 9110 §15.5.6.
Is a 405 response cacheable?
Yes. 405 is one of the codes RFC 9110 §15.1 lets caches store heuristically, so it can be reused without explicit caching headers. Send Cache-Control to control how long.