All HTTP status codes

HTTP 405 Method Not Allowed

Client Error

The URL exists but doesn't support the HTTP method used — e.g. POSTing to a GET-only endpoint. The Allow header lists what's permitted.

Defined in RFC 9110

Common causes

  • Calling an endpoint with the wrong verb (POST vs PUT)
  • Reverse proxy or static host blocking non-GET methods
  • Framework route defined only for specific methods

How to fix it

  1. Check the Allow response header and switch the method

  2. Register the handler for the needed method on the server

  3. Make sure intermediate proxies forward non-GET methods

Want to explore status codes interactively? Try the free HTTP Status Code Reference — search, categories and example responses, right in your browser.