More
More
451 Unavailable For Legal Reasons
The resource is blocked for legal reasons, such as a court order or sanctions.
- Code
451- Reason phrase
- Unavailable For Legal Reasons
- Class
- 4xx Client error
- Defined in
- RFC 7725 section 3
- Cacheable by default
- No
What it means
Client error: the problem lies with the request. Repeating it unchanged will normally fail again.
When a server should send it. When access is refused because of a legal demand, such as a court order or a government block. The response should say who made the demand, and may name them in a Link header with rel="blocked-by".
Common causes. Content withheld in some countries, or a legal takedown.
What to do. Nothing a visitor can fix. The response should say who demanded the block.
How clients and crawlers treat it
Browsers and HTTP clients. Browsers show the body. Crawlers treat it like any other 4xx.
Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 451 Unavailable For Legal Reasons Link: <https://authority.example/order>; rel="blocked-by" Unavailable For Legal Reasons
How to send 451
location /example {
return 451;
}
RewriteEngine On RewriteRule ^example$ - [R=451,L]
http_response_code(451); echo 'Unavailable For Legal Reasons'; exit;
res.writeHead(451, { 'Content-Type': 'text/plain' });
res.end('Unavailable For Legal Reasons');
# in a view function return 'Unavailable For Legal Reasons', 451
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 403ForbiddenThe server understood the request but refuses it.
- 404Not FoundNothing exists at this address, or the server will not say that it does.
- 410GoneThe resource was deliberately removed and will not come back.
All status codes · All 4xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.