451 Unavailable For Legal Reasons
Description
The 451 Unavailable For Legal Reasons
status code indicates that the server is denying access to the resource as a consequence of a legal demand. This status code was introduced to specifically address situations where access to content is being denied for legal reasons, such as government-mandated censorship or court orders.
The name "451" is a reference to Ray Bradbury's novel "Fahrenheit 451," which deals with themes of censorship and the burning of books.
This status code is commonly used when: - Content is blocked due to government censorship - Content is unavailable due to a court order - Content has been removed to comply with DMCA takedown notices - Access is restricted due to geographic legal restrictions - Content violates local laws or regulations
The 451 Unavailable For Legal Reasons
response should include an explanation and, if possible, details about the specific legal demand causing the restriction.
Syntax
The server responds with a 451 Unavailable For Legal Reasons
status:
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://example.org/legal>; rel="blocked-by"
Content-Type: application/json
Content-Length: [length in bytes]
{
"error": "Unavailable For Legal Reasons",
"message": "Access to this resource has been disabled due to legal restrictions"
}
Examples
Government Censorship Example
A client attempts to access content that is censored by government mandate:
Client Request:
Server Response:
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://news.example.com/legal/censorship>; rel="blocked-by"
Content-Type: text/html
Content-Length: 458
<!DOCTYPE html>
<html>
<head>
<title>Legally Restricted Content</title>
</head>
<body>
<h1>451 Unavailable For Legal Reasons</h1>
<p>We're sorry, but access to this content has been restricted due to a legal order from the government of [Country].</p>
<p>Legal reference: National Security Act, Section 47, Order #2023-156</p>
<p>Blocking authority: Ministry of Information</p>
<p>This restriction applies to visitors from your current location.</p>
</body>
</html>
Copyright Takedown Example
A client attempts to access content that has been removed due to a copyright claim:
Client Request:
Server Response:
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://videos.example.com/legal/dmca>; rel="blocked-by"
Content-Type: application/json
Content-Length: 287
{
"error": "Unavailable For Legal Reasons",
"message": "This content has been removed in response to a legal request from Copyright Holder Inc.",
"legal_basis": "Digital Millennium Copyright Act",
"removal_date": "2023-06-10",
"case_reference": "DMCA-2023-789012",
"dispute_url": "https://videos.example.com/legal/counter-notice"
}
Geo-Restricted Content Example
A client attempts to access content that is legally restricted in their geographic region:
Client Request:
Server Response:
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://streaming.example.com/legal/geo-restrictions>; rel="blocked-by"
Content-Type: application/json
Content-Length: 243
{
"error": "Unavailable For Legal Reasons",
"message": "This content is not available in your region due to licensing restrictions",
"region_detected": "DE",
"legal_basis": "Exclusive distribution agreement with RegionalStreamer GmbH",
"available_regions": ["US", "CA", "MX"]
}
Summary
The 451 Unavailable For Legal Reasons
status code provides transparency when content is being blocked for legal reasons. It allows servers to clearly communicate that the restriction is due to legal demands rather than technical issues or policy decisions. This status code is particularly valuable for transparency in cases of censorship, copyright enforcement, and geo-restricted content. By including information about the legal basis for the restriction, the blocking authority, and potentially how to challenge the restriction, servers can provide users with important context about why the content is unavailable.