501 Not Implemented means the server does not support the functionality needed to fulfill the request. It is returned for a request method the server does not recognize, or for a feature that simply has not been built yet.
It looks similar to 405 Method Not Allowed but differs: 405 means "the method is known but not allowed for this resource," while 501 means "the server does not implement that functionality/method at all" — a server-side limitation.
PATCH /api/resource HTTP/1.1
Host: api.example.com
Content-Type: application/json
{"x":1}HTTP/1.1 501 Not Implemented
Content-Type: text/plain
The server does not support the functionality required to fulfill this request.app.all('/api/experimental', (req, res) => {
res.status(501).send('Not Implemented');
});# Reject methods the server does not implement
if ($request_method !~ ^(GET|POST|HEAD)$) {
return 501;
}