Client uses the wrong method
- Where to look
- The request in DevTools or
curl -v - Fix
- Use a method listed in
Allow
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.
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.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
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.
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.
curl -i -X OPTIONS https://example.com/api/orders
# HTTP/1.1 200 OK
# Allow: GET, POST, HEAD, OPTIONScurl -vAllowaction URLlimit_except, Apache <Limit>, <LimitExcept> and TraceEnableTraceEnable off is set; for the other rules, check which status they actually sendCloudflare 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.
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.
location /reports/ {
limit_except GET {
deny all;
}
}4 questions people ask next, answered from the sources on this page.
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.
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.
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.
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.
Run the free audit, then approve the fixes. Every change can be undone.