HTTP 405 Method Not Allowed

A narrow intake slot accepts a flat envelope while a parcel waits outside

HTTP 405 Method Not Allowed means the server knows the HTTP method but the selected resource does not support it. The response’s Allow header lists the methods the resource currently supports.

Check which method you actually sent

A file endpoint might accept GET and HEAD, while an action endpoint accepts only POST. A proxy tester that sends a GET can get 405 from a POST-only route even while the route works as designed. Use an appropriate GET endpoint for the tester.

Compare the method at each hop

In a header trace, keep the request line beside the 405 and the Allow value. If the method changed, inspect any redirect that preceded the error. When the same method and URL work directly, check routing and method policies on the reverse proxy before changing the application.

Read the Allow header beside the failing method

Imagine an API returns 405 with Allow: GET, HEAD after receiving POST /reports/42. A GET can be appropriate for reading the report. If you need to submit a new report, use the API’s documented creation endpoint. Check the method at the effective URL after redirects, including a redirect triggered by a trailing slash or a change in hostname. A 405 on the final request explains why changing the original client call may still leave the same error.

When a browser fails before sending the actual request

A cross-origin browser call can make an OPTIONS preflight request. If the route or gateway replies to OPTIONS with 405, inspect how that service handles preflight for the approved origin and method. The browser’s network panel shows whether the intended request followed. Compare the preflight log on the reverse proxy with the application’s access log to see where the method was rejected. If the server lacks implementation for the method itself, see 501 Not Implemented.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester