Free auditStart free
GuideError · HTTP status codes

HTTP 405 Method Not Allowed

HTTP 405 means the resource exists but does not support the request method. See the Allow header, common causes and fixes on nginx, Apache, Cloudflare and APIs.

4 min
read
6
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
The short answer

HTTP 405 Method Not Allowed means the server knows the request method but the target resource does not support it, such as a POST to a URL that only accepts GET. The response must carry an Allow header listing the methods that do work. Check the method and URL, then fix the route or the server rules that block it.

  1. What does HTTP 405 mean?
  2. Read the Allow header first
  3. Common causes and fixes
  4. Server rules that block methods
  5. What it does to SEO
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Explained

What does HTTP 405 mean?

RFC 9110 says a 405 (Method Not Allowed) means the method in the request line is known by the origin server but not supported by the target resource. The server must send an Allow header listing the methods the resource currently supports. MDN gives the same rule: the server "must" generate that header in a 405 response.

That separates it from a 404: with a 405 the server knows your method, but the resource does not support it. It also differs from a 400, where the request is malformed. Cloudflare's example is a POST request to a resource that supports only GET.

RFC 9110 requires all general-purpose servers to support GET and HEAD. Every other method is optional. A page that works in the browser (a GET) can still return 405 for a form post or an API call.

02Check it

Read the Allow header first

The Allow header is the fastest diagnostic. An OPTIONS request asks the resource about its communication options, and a successful response should include headers such as Allow. Browsers also send OPTIONS as the CORS preflight before some cross-origin requests; when that check fails, the browser reports a CORS error rather than the status code.

If Allow lists the method you used, something may be changing the request on the way, such as a redirect that turns a POST into a GET. If it does not, the method is wrong for the URL or the route is not defined for it. An empty Allow value means the resource allows no methods, which RFC 9110 says might occur if the resource is temporarily disabled by configuration.

See which methods the URL accepts
curl -i -X OPTIONS https://example.com/api/orders
# HTTP/1.1 200 OK
# Allow: GET, POST, HEAD, OPTIONS
03Causes of a 405

Common causes and fixes

Cause

Client uses the wrong method

Where to look
The request in DevTools or curl -v
Fix
Use a method listed in Allow
Cause

API route defined for other methods only

Where to look
Route table or controller
Fix
Add a handler for the method, or call the right route
Cause

Posting to a static file or page

Where to look
The form action URL
Fix
Post to the endpoint that processes the data
Cause

Server rule limits methods

Where to look
nginx limit_except, Apache <Limit>, <LimitExcept> and TraceEnable
Fix
Apache returns 405 for TRACE when TraceEnable off is set; for the other rules, check which status they actually send
Cause

Redirect changed the method

Where to look
The redirect status and target
Fix
RFC 9110 lets a client change POST to GET after a 301; call the final URL directly or redirect with 308
Cause

File or directory permissions

Where to look
Server and file permissions
Fix
MDN notes that improper permissions can cause a 405

Cloudflare says it does not directly generate 405 errors. They come from the origin server, so review the origin's configuration to make sure the right methods are enabled for the resource.

04Check it

Server rules that block methods

In nginx, limit_except limits which HTTP methods are allowed inside a location. Allowing GET also allows HEAD. Access to the other methods is then limited by access directives, so check this block when a method works on one path and not another. The nginx and Apache docs do not say which status a denied method receives, so read the actual response: a 405 with an Allow header means the resource does not support the method, and a different code points at an access rule instead.

In Apache, <Limit> restricts access controls to the named methods, and <LimitExcept> applies them to every method not listed. The Apache docs show <LimitExcept POST GET> followed by Require valid-user, which applies the access rule to every method other than POST and GET. Check both blocks, including any in .htaccess. Separately, TraceEnable off makes the core server and mod_proxy return a 405 (Method not allowed) error for TRACE requests, which is deliberate.

Access limited to GET and HEAD; other methods get the deny rule
location /reports/ {
    limit_except GET {
        deny all;
    }
}
05Explained

What it does to SEO

Search crawlers fetch pages with GET, so a 405 only matters for SEO if GET or HEAD is blocked on a public URL. Google treats a 4xx response (except 429) as a signal that the content doesn't exist, and removes previously indexed URLs that return one. If Search Console shows 405s for URLs you want indexed, remove the rule that blocks GET. See 4xx errors.

Related errors: nginx, Apache.

Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What does 405 mean?

The server knows the request method, but the target resource does not support it. The response lists the supported methods in an Allow header. For example, a POST to a read-only URL returns 405.

02How can I fix HTTP error 405?

Check which method you sent, then read the Allow header or send an OPTIONS request. Use a listed method, or fix the route or server rule so the method is supported. Redirects can also change the method.

03What is the difference between 404 and 405?

A 404 means nothing was found at the URL. A 405 means the resource exists but does not support the method you used, and the response lists the methods that work.

04How do I bypass a 405 not allowed?

You can't and shouldn't. Use a method the resource lists in Allow. If you own the server and the method should work, fix the route or the rule in nginx or Apache that blocks it.

Sources · 6

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • mozilla.org
  • cloudflare.com
  • nginx.org
  • apache.org
  • google.com
  1. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02405 Method Not Allowed - HTTP - MDN Web Docsdeveloper.mozilla.org · checked 2026-10-25
  3. 03Error 405: Method Not Allowed - Cloudflare Support docsdevelopers.cloudflare.com · checked 2026-10-25
  4. 04Module ngx_http_core_module - nginx documentationnginx.org · checked 2026-10-25
  5. 05Core Features - Apache HTTP Server 2.4httpd.apache.org · checked 2026-10-25
  6. 06How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane