HTTP status code · Client errors (4xx)
451 Unavailable For Legal Reasons
451 Unavailable For Legal Reasons means the server is denying access to the resource because of a legal demand. Common causes are a court order, a copyright takedown such as a DMCA notice, or a site blocking visitors from a country whose law it does not want to comply with.
| Class | 4xx, Client errors |
|---|---|
| Defined in | RFC 7725 §3 |
| Cacheable by default | Yes, heuristically cacheable; RFC 7725 makes it cacheable by default |
| Safe to retry | No; the block stays until the legal demand is lifted |
| Relevant headers |
|
What 451 means
RFC 7725 (2016) defines 451, a number chosen as a nod to Ray Bradbury's Fahrenheit 451. The response should explain the demand in its body: who made it, under which law, and whom it affects. It should also carry a Link header with rel="blocked-by" pointing to the party that is actually implementing the block, which may be an ISP or a search engine rather than the site you asked for.
The RFC notes that 451 implies neither that the resource exists nor that it does not, and that it is cacheable by default. GitHub, for example, serves 451 for repositories disabled after a DMCA takedown, and some US news sites answered EU visitors with a 451 page when GDPR took effect in May 2018.
Common causes
If you are visiting the site
- The content was removed from your country after a court order or government request.
- A copyright holder filed a takedown and the host disabled the page or repository.
- The site chose to block your region instead of complying with a local privacy or content law.
If you run the server
- You received a legal order and need to disable one resource, or serve it everywhere except one jurisdiction.
- Your CDN or hosting provider applied the block on its side and returns 451 on your behalf.
How to fix it
If you are visiting the site
- Read the page body: a compliant 451 says who demanded the block and under which law.
- Look for the same content from another official source or a version cleared for your region; there is nothing to fix on your device.
If you run the server
- Use 451 rather than 404 or 403 for legally blocked content, so users, researchers and crawlers can see censorship for what it is.
- Include the explanation in the body and a Link: <https://your-site>; rel="blocked-by" header identifying yourself as the blocking party.
- Scope the block narrowly (one URL, one region) and keep the legal reference in your records for when the demand expires.
How to send 451
app.get('/videos/:id', (req, res) => {
res.set('Link', '<https://example.com>; rel=blocked-by');
res.status(451).json({ error: 'Unavailable in your country under court order 2026/114' });
});// app/videos/[id]/route.ts
export async function GET() {
return Response.json(
{ error: 'Unavailable in your country under court order 2026/114' },
{ status: 451, headers: { 'Link': '<https://example.com>; rel=blocked-by' } }
);
}mux.HandleFunc("GET /videos/{id}", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Link", "<https://example.com>; rel=blocked-by")
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusUnavailableForLegalReasons) // 451
w.Write([]byte(`{"error":"Unavailable in your country under court order 2026/114"}`))
})from fastapi import FastAPI, HTTPException
app = FastAPI()
@app.get("/videos/{id}")
def get_video(id: str):
raise HTTPException(status_code=451, detail="Unavailable in your country under court order 2026/114", headers={"Link": "<https://example.com>; rel=blocked-by"})location = /videos/8841 {
add_header Link '<https://example.com>; rel="blocked-by"' always;
return 451 'Unavailable for legal reasons: removed under court order 2026/114.\n';
}Commonly confused with
- 451 vs 403
- 403 is a refusal based on your permissions; 451 is a refusal imposed by law that no credentials can lift.
- 451 vs 404
- Sites sometimes hide legally removed content behind a 404; 451 states openly that a legal demand is the reason.
- 451 vs 410
- 410 says the owner removed the resource for good; 451 says it is withheld because of an outside legal demand and might return if that ends.
Frequently asked questions
- Why is it called 451?
- It references Fahrenheit 451, Ray Bradbury's novel about book burning. Tim Bray proposed the code, and the IETF published it as RFC 7725 in February 2016.
- Can I get around a 451 error with a VPN?
- RFC 7725 itself notes that clients can often reach blocked content with a VPN or Tor, because many blocks are based on location. Whether that is legal depends on where you are and on the terms of the service.
- Who is blocking the page when I see 451?
- Not necessarily the website. The RFC asks whoever enforces the block to identify itself in a Link header with rel="blocked-by", which can be the site, a CDN, an ISP or a search engine.
Last reviewed by Arielton Oberek.