DevToolPal
EN
4xx Client errors

405 Method Not Allowed

What it means

The URL exists but does not support the HTTP method used. The Allow header lists the methods that work.

Common causes

  • POST to a static file or a GET-only route
  • A form submits to the wrong endpoint
  • The route defines the method under a different path, such as with a trailing slash

How to fix it

As a client or visitor

Check the Allow header and the API documentation, and make sure the method and URL match.

As the site or API owner

Always send Allow with 405. Check routing for trailing-slash differences and that static hosting is not handling API paths.

Example response

HTTP/1.1
HTTP/1.1 405 Method Not Allowed
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Allow: GET, HEAD, POST
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Method Not Allowed",
  "status": 405,
  "detail": "DELETE is not supported on /users."
}

Specification

RFC 9110 §15.5.6

FAQ

› 405 vs 404?

404: nothing is here. 405: something is here, but not for this method.

› Why do I get 405 on POST with a static host?

Static hosts only serve GET/HEAD; POST needs a server-side function or an external form endpoint.