More
More
501 Not Implemented
The server does not support the method or feature the request needs.
- Code
501- Reason phrase
- Not Implemented
- Class
- 5xx Server error
- Defined in
- RFC 9110 section 15.6.2
- Cacheable by default
- Yes
What it means
Server error: the request may be fine, but the server failed to carry it out.
When a server should send it. When the server does not support the method at all, for any resource. For a method that works elsewhere but not on this URL, 405 is right instead.
Common causes. An unusual HTTP method sent to a basic server.
What to do. Use a method the server supports.
How clients and crawlers treat it
Browsers and HTTP clients. Clients treat it as a server error; it is cacheable by default, since retrying will not help.
Google Search. Googlebot treats 5xx responses as a sign of trouble and temporarily slows its crawl rate. Already indexed URLs are kept at first, but are dropped if the errors continue. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Cacheable by default (RFC 9110 section 15.1). With no Cache-Control or Expires header, a cache may still store it and reuse it for a heuristic period, often 10% of the time since Last-Modified, so set Cache-Control explicitly if that is not what you want.
Example response
HTTP/1.1 501 Not Implemented Content-Type: text/plain; charset=utf-8 Not Implemented
How to send 501
location /example {
return 501;
}
RewriteEngine On RewriteRule ^example$ - [R=501,L]
http_response_code(501); echo 'Not Implemented'; exit;
res.writeHead(501, { 'Content-Type': 'text/plain' });
res.end('Not Implemented');
# in a view function return 'Not Implemented', 501
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 405Method Not AllowedThe address exists but does not accept this method, such as POST where only GET works.
- 500Internal Server ErrorSomething went wrong on the server and it has no more specific code to give.
- 505HTTP Version Not SupportedThe server does not support the HTTP version used in the request.
All status codes · All 5xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.