4xx Client error

HTTP 405 Method Not Allowed

The method is not supported for this resource. The Allow header lists the valid methods.

405 Method Not Allowed means the URL exists but does not accept this HTTP method, for example a POST to a read-only resource. The response must list the allowed methods in an Allow header.

HTTP/1.1 405 Method Not Allowed

Common causes

  • Sending POST to an endpoint that only supports GET, or DELETE where it is not implemented.
  • A form posting to a static file server.
  • A CORS preflight OPTIONS request that the server does not handle.

How to fix it

  • Read the Allow header and use one of the listed methods.
  • Check the API documentation for the right method and path.
  • Make sure the server handles OPTIONS if browsers call it cross-origin.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes