405
Method Not Allowed
4xx Client error
Class
RFC 9110 §15.5.6
Defined in
What does HTTP 405 mean?
The URL exists, but does not support the HTTP method used. For example, sending POST to an endpoint that only accepts GET. The response must include an Allow header listing the supported methods.
4xx Client error: The request has a problem the client can fix: wrong URL, missing credentials, bad data or too many requests.
Common causes of a 405 error
- A form or API client using the wrong method.
- A static host that does not accept
POSTto HTML files. - A CORS preflight
OPTIONSrequest that the server does not handle.
How to fix 405 Method Not Allowed
- Check the method in the API documentation and the
Allowheader. - Add an
OPTIONShandler (or CORS middleware) for cross-origin APIs.
405 and SEO
Crawlers use GET; a page returning 405 to GET will not be indexed.
Example response
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD
Related status codes
- 400 Bad Request — The server cannot process the request because it is malformed.
- 404 Not Found — The server cannot find anything at the requested URL.
- 501 Not Implemented — The server does not support the functionality required to fulfil the request.
Check which status code a URL returns with the HTTP header checker.
All HTTP status codesSearch the full list of status codes from 100 to 599 with their meanings and SEO impact.
Open the full list Frequently asked questions
What does status code 405 mean?
405 Method Not Allowed: The URL exists, but does not support the HTTP method used.
How do I fix a 405 error?
Check the method in the API documentation and the
Allow header. Add an OPTIONS handler (or CORS middleware) for cross-origin APIs.Does 405 affect SEO?
Crawlers use GET; a page returning 405 to GET will not be indexed.