501

Not Implemented

5xx Server Error

Back to list

Server perspective

Use 501 when the server does not support the request method or required functionality anywhere on the server.

When to use

  • Return 501 when the method or capability is unimplemented across the server, not merely disallowed on one resource
  • Use it for truly unsupported functionality, not for temporary outages or ordinary application exceptions

How to respond

  • Confirm the method or feature is not implemented before returning 501; if the resource-specific method is known but disallowed, return 405 with Allow instead
  • Explain the unsupported capability in a safe machine-readable error body when possible

Headers to consider

  • No status-specific header is required; unlike 405, 501 does not require an Allow header
  • Set explicit cache controls if you do not want default cacheability to apply

Response body

  • A body is optional but helpful; identify the unsupported method or capability and any supported alternative if one exists

Server-side pitfalls

  • Do not return 501 for GET or HEAD, which compliant servers are expected to support
  • Do not use 501 when the method is understood but blocked on a particular resource

Examples

API does not implement PATCH anywhere

Request:PATCH /v1/users/123
Response:501 Not Implemented with error: method_not_supported

The server cannot process PATCH on any resource, so this is a capability gap rather than a resource-specific rule.

References

Related 5xx Server Error Codes