501 Not Implemented

HTTP response status code 501 Not Implemented is a server error message that is returned to indicate that it does not support a specific feature that is required to complete the HTTP request.

The HTTP response is cacheable by default. If the default behavior needs to be overridden then the HTTP response must include the appropriate HTTP caching headers.

Usage

When the 501 Not Implemented status code is received, it means that the server is not able to fulfill the request due to a server-side deficiency. This is similar to the 405 Method Not Allowed status code, although that is specific in that the client has requested functionality that is not supported. While that may be strictly true at the time of the HTTP request, the functionality may be under development or otherwise not working temporarily. A 405 Method Not Allowed status code suggests that the HTTP request cannot be filled and that the functionality will not be available in the foreseeable future, whereas a 501 Not Implemented status code is used to suggest that it’s “not yet implemented but will be", or “this is something that you can do, once I am ready for you to do it". In this situation, the server can optionally supply a Retry-After HTTP header, suggesting a time for the client to try again.

According to RFC 7231, this is appropriate in cases where the server does not recognize the HTTP request method and thus, cannot fulfill it.

Example

In the example, the client requests a resource and the server responds with a 501 Not Implemented status code because it recognized the HTTP request, but it is not (yet) supported.

Request

POST /requests?id=111&flag=start HTTP/1.1
Host: www.example.re

Response

HTTP/1.1 501 Not Implemented
Content-Type: text/html; charset=UTF-8
Content-Length: 202

<html>
  <head>
    <title>Function Not Implemented<\title>
  </head>
  <body>
    <p>Your request can not be completed because this functionality is currently under development.</p>
  </body>
</html>

Code references

.NET

HttpStatusCode.NotImplemented

Rust

http::StatusCode::NOT_IMPLEMENTED

Rails

:not_implemented

Go

http.StatusNotImplemented

Symfony

Response::HTTP_NOT_IMPLEMENTED

Python3.5+

http.HTTPStatus.NOT_IMPLEMENTED

Java

java.net.HttpURLConnection.HTTP_NOT_IMPLEMENTED

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_NOT_IMPLEMENTED

Angular

@angular/common/http/HttpStatusCode.NotImplemented

Takeaway

The 501 Not Implemented status code is a server error used to indicate that the HTTP request cannot be completed because the server does not support the required functionality at this time.

See also

Last updated: August 2, 2023