Method Not Allowed — the resource exists but does not accept this HTTP method
What 405 Means
The 405 error on the HTTP Status-Codes indicates method not allowed — the resource exists but does not accept this http method. This typically occurs due to post request sent to a read-only endpoint.
A 405 Method Not Allowed response means the target resource exists, but the HTTP method used for the request is not allowed for that resource. Unlike a 404, the problem is not the URL itself. The resource is there, yet the server has decided that GET, POST, PUT, DELETE, or another method is not valid in that specific context. Many servers also send an Allow header listing accepted methods.
Technical Background
A 405 response sits at the boundary between routing and application behavior. The server has successfully matched the target resource, but the method attached to the request is not part of the allowed contract for that route.
That makes 405 different from 404 and 501. A 404 usually means the resource was not found, while a 501 suggests the server does not support the method class at all. A 405 is narrower: the method exists in HTTP, but this resource will not accept it.
Common Causes
- POST request sent to a read-only endpoint
- Route is registered for only a subset of methods
- OPTIONS or HEAD request reaches an unsupported handler
- Form action or API client uses the wrong verb
Typical Scenarios
- A form submits a POST request to an endpoint that only supports GET
- An API client sends DELETE to a route that was implemented for PATCH only
- A preflight or automation request uses a method the backend never registered
What to Know
A 405 is usually consistent for the same URL and method combination. If a route returns 200 for GET but 405 for POST, the issue is likely in the route contract or client behavior rather than in overall site availability.
Frequently Asked Questions
Common questions about HTTP 405 error
Not necessarily. A 405 usually means the server found the resource but rejected the HTTP method used for the request.
A 404 means the resource could not be found at that URL. A 405 means the resource exists, but the method used for the request is not allowed there.
The endpoint may be implemented for a different method such as GET or PATCH, or the route contract may restrict writes to another URL entirely.