loot.tools
405

Method Not Allowed

4xx Client Error

The request method is known but not supported for this resource.

405 Method Not Allowed means the endpoint exists but doesn't accept the HTTP method you used - like POSTing to a read-only route. The server should return an Allow header listing the methods it does accept. It's often a sign the client is hitting the right URL with the wrong verb.

What 405 looks like on the wire

DELETE /api/users HTTP/1.1
Host: api.example.com

HTTP/1.1 405 Method Not Allowed
Allow: GET, POST

About 4xx Client Error

The request has a problem the client needs to fix, like a bad URL, missing auth, or invalid input.

How to fix 405 Method Not Allowed

  • Check the Allow header to see which methods the endpoint accepts.
  • Match the method to the API docs (GET vs POST vs PUT vs PATCH).
  • Watch for a trailing-slash redirect turning a POST into a GET.

Where it's defined

405 Method Not Allowed is defined in RFC 9110 §15.5.6. MDN's 405 reference covers browser behavior and examples.

Looking for a different one? See the full HTTP status code reference.