451 Unavailable For Legal Reasons
Content blocked due to legal demands (censorship, DMCA).
The resource is unavailable due to legal reasons.
What HTTP 451 Unavailable For Legal Reasons Means
The resource is unavailable due to legal reasons.
Content blocked due to legal demands (censorship, DMCA).
Common Causes
- DMCA takedown
- Government censorship
- Court order
- Copyright claim
How to Fix It (For Visitors)
- Content legally restricted in your region
- Use VPN (if legal)
- Contact content owner
How to Fix It (For Developers/Admins)
- Return with legal blocking reason in response body
- Specify blocking entity
- Include legal reference
Returning a 451 Unavailable For Legal Reasons (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 451 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(451).json({ error: 'Unavailable For Legal Reasons' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='Unavailable For Legal Reasons'), 451
PHP
<?php
http_response_code(451);
header('Content-Type: application/json');
echo json_encode(['error' => 'Unavailable For Legal Reasons']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 451 Unavailable For Legal Reasons
Frequently Asked Questions
What does HTTP 451 Unavailable For Legal Reasons mean?
Content blocked due to legal demands (censorship, DMCA). In short: The resource is unavailable due to legal reasons.
Is 451 Unavailable For Legal Reasons a client or server error?
451 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.
How do I fix a 451 Unavailable For Legal Reasons error?
Return with legal blocking reason in response body. Specify blocking entity. Include legal reference.
Official Specification
The 451 Unavailable For Legal Reasons status code is defined in RFC 7725.