451 Unavailable For Legal Reasons: what it means and how to handle it
A 451 means a page is blocked because of a legal demand, not a server fault. Learn who sends it, how to read the Link header, and how to monitor sites that return it.
· 6 min read · By the Spot Downtime team
Most error codes describe a technical failure. 451 Unavailable For Legal Reasons is different: the server is working, it understood the request, and it is refusing on purpose because a law, a court order or a legal demand says it must not serve this content to this client. The number is a nod to Ray Bradbury's novel Fahrenheit 451, and the status is defined in RFC 7725.
This post explains what sends a 451, how it differs from a 403, how to read the extra information a good 451 carries, how to return one correctly if you run a site, and what it means for uptime monitoring.
What a 451 tells you
A 451 says the resource exists, but access is denied as a consequence of a legal requirement. It is not a sign that the site is down, misconfigured or that you did something wrong. Typical causes:
- Geographic blocking. A site decides not to serve a region, for example because it cannot meet local privacy rules, or because a licensing agreement covers only some countries.
- Court orders and takedowns. A page or a file is removed or blocked after a copyright, defamation or regulatory demand.
- Government or ISP blocking. A network operator blocks access to a site and answers on its behalf, using 451 so that the reason is visible instead of a fake connection error.
- Platform enforcement. A hosting or CDN provider disables a resource after a legal notice.
451 vs 403 vs 404 vs 410
These all say "you can't have this", and the difference is the reason:
- 403 Forbidden: the server refuses, usually for permissions, and doesn't say why. See the 403 guide.
- 404 Not Found: nothing is here, or the server pretends so. See the 404 guide.
- 410 Gone: it was here and has been removed for good. See the 410 guide.
- 451: it is here, but a legal demand prevents us from serving it. The honest answer is the one that names the cause.
Returning 403 or 404 for legally blocked content is common, because it is simpler and reveals less. 451 exists so that users and automated clients can tell censorship or compliance blocking apart from an ordinary permission problem.
The Link header: who blocked it
RFC 7725 says a 451 response should include an explanation in the body, and it defines a blocked-by link relation that identifies the party implementing the block. A well-formed response looks like this:
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://example.com/legal>; rel="blocked-by"
Content-Type: text/html
<h1>Unavailable for legal reasons</h1>
<p>We are not able to show this page in your region.
See <a href="https://example.com/legal">our legal notice</a>.</p>The target of blocked-by identifies the entity that is blocking access, which is not necessarily the one that demanded it. It does not have to be a page about the law. Treat it as an attribution, not a case reference. You can see whether a URL sends it with the HTTP headers checkerfree HTTP headers tool or with curl -I https://example.com/page.
If you are a visitor
- Read the page. A decent 451 explains who blocked it and sometimes why.
- Check whether it happens everywhere or only from your country or network. Request the same URL from another location with the Check a website from multiple locationsmulti-location check. Different answers in different places point to geographic blocking.
- Do not assume the site is broken. Refreshing and clearing the cache will not change a decision made for legal reasons.
If you run the site
If you block a region or a specific resource, decide first whether 451 is the right status. It fits when the block is a legal obligation. It does not fit a plain paywall, a rate limit (429) or a login requirement (401).
A minimal nginx example that returns 451 for a list of countries, using the GeoIP2 module to set a variable:
# http {} context, with ngx_http_geoip2_module loaded
geoip2 /usr/share/GeoIP/GeoLite2-Country.mmdb {
$geoip2_country_code country iso_code;
}
map $geoip2_country_code $legal_block {
default 0;
XX 1; # replace with the ISO codes you must block
}
server {
location / {
if ($legal_block) {
return 451;
}
# ...
}
error_page 451 /451.html;
location = /451.html {
internal;
add_header Link '<https://example.com/legal>; rel="blocked-by"' always;
}
}Serve a short, plain explanation page instead of the default error text, and keep it free of the content you are blocking. A few practical points:
- Caching. A 451 is cacheable by default, and a CDN can store it and serve it to users who should have received the real page. If the block depends on location, add
Varyor a cache key that includes the country, or mark the responseCache-Control: no-store. - Search engines. Crawlers treat a 451 as the page being unavailable. If it applies to a country that your crawler happens to come from, the page can drop out of results.
- Get the legal side right. Which content you must block, and where, is a question for a lawyer. The status code only reports your decision.
What a 451 means for monitoring
A monitor that expects 200 will report a 451 as down, and for the people being blocked that is accurate. For everyone else it is a false alarm. Two situations come up:
- Your own site blocks a region. If a monitoring probe is in that region, it will see a 451 while your real audience sees 200. Decide which view you care about. Checks that run from several locations separate a regional block from a real outage, so an alert that fires from one location only deserves a different reaction than one from all of them.
- A third party you depend on blocks you. An API or a feed that starts returning 451 to your servers will not fix itself with a retry. It needs a human decision. Alert on the status code explicitly for those endpoints instead of only on connection failure.
If a 451 on a page is expected, set the monitor to accept it or point the check at a URL that isn't blocked. See monitor says down but the site works for how to tell a real outage from a difference in what each location sees.
Quick summary
blocked-by link, compare results from different locations, and don't treat it as an outage unless the people you serve are affected.Related reading
Get new guides by email
Practical posts on monitoring, outages, error fixes and on-call, when they're published. No spam.
Keep reading
- HTTP errors · HTTP · Troubleshooting304 Not Modified: what it means and how conditional requests workA 304 is not an error: it means the cached copy is still good. How ETag and Last-Modified revalidation works, why a 304 can go wrong, and how to debug stale content.November 26, 2026 · 7 min read
- HTTP errors · TroubleshootingRandom 502 errors behind a load balancer: the keep-alive timeout mismatchRare, unpredictable 502s with a healthy backend often come from keep-alive timeouts: the app closes idle connections before the proxy does. How to confirm and fix it.November 26, 2026 · 6 min read