Unavailable For Legal Reasons
4xx Client Error
Last updated:
The resource is unavailable due to legal demands (censorship, DMCA, GDPR).
Description
The '451' code is a nod to Fahrenheit 451. Used to explicitly signal legal blocking rather than pretending the resource doesn't exist (404).
When to use
Return 451 when content is blocked due to legal reasons, ideally with a Link header pointing to the authority.
Specification
RFC 7725
Examples
HTTP response
HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: application/json
{"error":"Unavailable For Legal Reasons"}Node.js (Express)
res.status(451).json({ error: "Unavailable For Legal Reasons" });Go (net/http)
w.WriteHeader(http.Status451)
Python (Flask)
return jsonify({"error": "Unavailable For Legal Reasons"}), 451Related status codes
All 4xx codes
400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload Too Large414 URI Too Long415 Unsupported Media Type418 I'm a teapot422 Unprocessable Entity425 Too Early428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons