501 Not Implemented
The server does not support the functionality needed for the request, typically an HTTP method it does not recognise.
What 501 Not Implemented means
501 means the server does not know how to handle the method for any resource. With 405, the server knows the method but this URL does not allow it.
Some APIs also use 501 for features that are planned but not built yet.
Common causes
- An uncommon or custom method, such as PROPFIND sent to a server without WebDAV.
- An API endpoint that is stubbed out but not implemented.
- A proxy that does not support the method.
How to fix 501 Not Implemented
- Check the method name for typos and use one the server supports.
- Check the API docs or changelog to see if the feature exists yet.
- If you run the server, enable the module that handles the method, or return 405 with an Allow header if only this resource rejects it.
Example response
HTTP/1.1 501 Not Implemented
Content-Type: text/plain; charset=utf-8
501 Not ImplementedHow to check for a 501 response
cURL
# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/JavaScript (Node.js)
const res = await fetch("https://example.com/");
if (res.status === 501) {
console.log(res.status, res.statusText);
}Python
import requests
res = requests.get("https://example.com/")
if res.status_code == 501:
print(res.status_code, res.reason)Go
res, err := http.Get("https://example.com/")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 501 {
fmt.Println(res.Status)
}Specification
501 Not Implemented is defined in RFC 9110, section 15.6.2.
Related status codes
- 405
The URL exists but does not accept the HTTP method you used, like sending POST to an endpoint that only allows GET.
- 500
Something went wrong on the server and it could not complete the request. It is a generic error and not your fault.
- 505
The server does not support, or refuses to use, the major HTTP version the client used for the request.