Find out which request your server doesn't support

501 Not Implemented means the server doesn't support the functionality a request needs, typically an HTTP method it doesn't recognize for any URL. It's rare on ordinary page loads, because every general-purpose server has to support GET and HEAD. When you see it, look at the method the request used and at which layer answered: your app, the web server in front of it, or a proxy or load balancer on the way.

When a server answers 501

  • A method it doesn't recognize

    The request uses a method the server, or a proxy it passes through, has no support for on any URL. A custom method or an extension method from a protocol the server doesn't speak gets this answer.

  • A WebDAV method with no handler

    WebDAV adds methods such as PROPFIND and SEARCH. When no handler is set up for them on that URL, the server can answer 501.

  • A transfer coding it can't decode

    A request body sent with a Transfer-Encoding value the server doesn't understand should get a 501. Some load balancers accept only chunked and identity.

  • A proxy that won't forward the method

    A proxy that can't handle an extension method refuses to pass the request on and sends the 501 itself, so your app never sees it.

RFC 9110 defines 501 and, in its section on methods, says a server should send it for a method it doesn't recognize or implement. RFC 9112 covers unknown transfer codings, MDN gives the WebDAV and proxy cases, and Amazon's load balancer guide lists chunked and identity as the only Transfer-Encoding values its Application Load Balancer supports.

Find which method gets the 501

# Send the safe methods to the failing URL and print the status for each
for m in GET OPTIONS; do
  printf "%s " "$m"; curl -sS -o /dev/null -w "%{http_code}\n" -X "$m" https://yoursite.com/api/items
done

# Show which server answered and any Allow header it sent
curl -sS -o /dev/null -D - -X OPTIONS https://yoursite.com/api/items | grep -iE '^(HTTP|server|allow)'

# Replay the failing request's method (PUT here) on a staging copy, never on production:
# PUT, PATCH and DELETE change data when they work
curl -sS -o /dev/null -w "%{http_code}\n" -X PUT https://staging.yoursite.com/api/items/test

501 or 405

  • The two codes split one case. A 501 says the server doesn't recognize the method at all. A 405 Method Not Allowed says it knows the method, but this URL doesn't accept it, and RFC 9110 requires a 405 to carry an Allow header listing the methods that work. If your app supports PUT on some routes and not others, the others should answer 405.

  • A 501 can also outlive the fix. RFC 9110 makes it heuristically cacheable, so a browser or CDN can keep serving a stored 501 when no Cache-Control header says otherwise. Send Cache-Control: no-store on error responses and purge the URL from your CDN once the server handles the method.

How to fix a 501 Not Implemented error

  1. Find the method and the URLLook up the failing request in your access log or the browser's network panel and note its method. Forms, API clients and file sync tools often send methods other than GET.
  2. Find which layer answeredCompare the Server header and the error page with your app's own. A CDN, firewall rule or web server that doesn't handle the method can answer before the request reaches your code.
  3. Add support or send the right codeIf the method should work, enable it on each server and proxy in the path and add a route for it in the app. If the app supports it on other URLs but not this one, answer 405 with an Allow header. If the app doesn't support it anywhere, 501 is already the right answer.
  4. Clear cached copies of the 501Purge the URL from your CDN after the fix, and make sure error responses carry a Cache-Control header that stops caches from keeping them.

Frequently asked questions

Why do I get a 501 on a normal page load?

General-purpose servers have to support GET and HEAD, and MDN says they mustn't answer those methods with 501. A 501 on an ordinary page request points to a security rule, plugin or proxy that rejects it with the wrong status. The Server header and the style of the error page show which one sent it.

Can visitors fix a 501 themselves?

Rarely. MDN suggests clearing the browser cache for the site, turning off a proxy if they use one, or trying again later, but the fix almost always belongs to the site's owner.