LightAtom

405 Method Not Allowed: Causes and Fixes

The address exists, but it doesn't accept the HTTP method you used, such as a POST to a page that only allows GET.

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

  1. Start over from the site

    1. Go back to the form's page, reload it and submit again.
    2. Report the problem if it keeps happening.

If you run the site

  1. Check the route and the method

    1. The response's Allow header lists the methods the URL accepts. Compare it with what the client sends.
    2. Check for a redirect: a POST redirected with 301/302 often turns into a GET, which can hit a POST-only route.
  2. Check the server configuration

    1. Static servers (nginx serving files, S3 websites) usually reject POST. Route API paths to your application.
    2. 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.

LightAtom team

The people who build LightAtom, a network monitor for macOS.