4xx Client error
405 Method Not Allowed
The resource exists but doesn’t support this HTTP method.
For example a POST to an endpoint that only accepts GET. The response should list allowed methods in an Allow header.
Common causes and fixes
- Check the method in your client code and the route definition on the server.
- Static hosting usually only allows GET/HEAD — form POSTs to a static site return 405.
- A failing CORS preflight (OPTIONS) can also show up as 405 if the server doesn’t handle OPTIONS.
Example response
HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD
Date: Thu, 22 Oct 2026 08:00:00 GMT Check a URL’s status with curl -I https://example.com, which prints the status line and headers.