451 Unavailable For Legal Reasons
Access is denied because of a legal demand, such as a court order or a government blocking request.
At a glance
- Status code
- 451 Unavailable For Legal Reasons
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 7725
- Cacheable by default
- yes
- Response body
- Should explain the legal demand and who made it.
In detail
451 exists to make legal censorship visible and machine-readable, rather than hiding behind a generic 403 or 404.
The specification asks for a Link header with rel="blocked-by" identifying the entity that made the demand, and a body explaining it.
As a client, 451 is not retryable and not a bug. As an operator, use it rather than 404: a silent block is exactly what the code was created to prevent.
Examples
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://example.org/order/12>; rel="blocked-by"
Content-Type: text/htmlThings that catch people out
- The number is a reference to Fahrenheit 451, which is a mnemonic rather than a technical property.
- 451 is cacheable by default, so a block lifted later can linger in caches.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →403 Forbidden
The server understood the request and refuses to fulfil it. Unlike 401, sending different credentials will not help.
410 Gone
The resource existed and has been permanently removed with no forwarding address. Stronger and more useful than 404 when you know the removal is final.
404 Not Found
The server has no representation for this URL and will not say whether it ever did. The most common status code on the web after 200.
500 Internal Server Error
The server hit an unexpected condition and cannot say anything more specific. It is the catch-all for unhandled exceptions.
501 Not Implemented
The server does not support the functionality required to fulfil the request, typically an unrecognised request method.
502 Bad Gateway
A proxy or load balancer got an invalid response from the upstream server it was relaying to. The failure is behind the thing that answered you.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL