405 Method Not Allowed
The server knows this address but doesn't accept the kind of request you sent, for example a form submission (POST) where only reading (GET) is allowed.
Quick checks
- Reload the page instead of resubmitting a form.
- Make sure the address is the one the form or app expects.
If you’re visiting the site
Start over from the site
- Go back to the form's page, reload it and submit again.
- Report the problem if it keeps happening.
If you run the site
Check the route and the method
- The response's
Allowheader lists the methods the URL accepts. Compare it with what the client sends. - Check for a redirect: a POST redirected with 301/302 often turns into a GET, which can hit a POST-only route.
- The response's
Check the server configuration
- Static servers (nginx serving files, S3 websites) usually reject POST. Route API paths to your application.
- Trailing-slash redirects can change the method; use 307/308 to keep it.
Still not working?
As a visitor, a 405 means the site has a bug; report it. As a developer, curl the endpoint with each method (curl -i -X POST …) to see which are allowed.
See what’s happening
LightAtom's connections view shows which server your app actually talks to, useful when a request hits a different host than you expected.
Frequently asked questions
What causes 405 Method Not Allowed?
Sending GET, POST, PUT, DELETE or another method to an address that doesn't accept it, often because of a wrong URL, a redirect that changed the method, or a missing route.
How do I see which methods are allowed?
Read the Allow header in the 405 response, for example with curl -i. It lists methods like GET, HEAD.
Why does my POST become a GET?
Browsers and many clients follow 301 and 302 redirects with a GET. Use 307 or 308 redirects, or post to the final URL directly.