451 Unavailable For Legal Reasons
The server cannot show this resource because of a legal demand, such as a court order, government block or copyright claim.
What 451 Unavailable For Legal Reasons means
Defined in RFC 7725. The number is a nod to Ray Bradbury's novel Fahrenheit 451.
The response should explain the legal demand. It can include a Link header with rel="blocked-by" naming the party that is carrying out the block.
Common causes
- A court order or government requirement in your country.
- A copyright or DMCA takedown notice.
- A site blocking regions where it cannot comply with local law, such as data protection rules.
How to fix 451 Unavailable For Legal Reasons
- As a visitor, there is nothing technical to fix. Read the explanation on the page and look for the content through legal channels in your region.
- As a site owner, use 451 rather than 403 or 404 for legal blocks, and explain the reason in the response body.
Headers that go with it
Link
Example response
HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: text/plain; charset=utf-8
451 Unavailable For Legal ReasonsHow to check for a 451 response
cURL
# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/JavaScript (Node.js)
const res = await fetch("https://example.com/");
if (res.status === 451) {
console.log(res.status, res.statusText);
}Python
import requests
res = requests.get("https://example.com/")
if res.status_code == 451:
print(res.status_code, res.reason)Go
res, err := http.Get("https://example.com/")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 451 {
fmt.Println(res.Status)
}Specification
451 Unavailable For Legal Reasons is defined in RFC 7725, section 3.
Related status codes
- 403
The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.
- 404
The server cannot find anything at this URL. The page may have moved or been deleted, or the link may have a typo.
- 410
The resource used to exist here but was deliberately removed and will not come back. There is no forwarding address.