HTTP 451 is Unavailable For Legal Reasons: the server is denying access to the resource as a consequence of a legal demand (RFC 7725 section 3). The number nods to Ray Bradbury’s Fahrenheit 451. The server sending it might not be the origin: RFC 7725 notes that legal demands most often fall on ISPs and search engines.
What to send
RFC 7725 asks for an explanation in the body: who made the demand, the law or regulation behind it, and which people and resources it covers. Whoever implements the block should identify itself in a Link header with rel="blocked-by":
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://isp.example.net/legal>; rel="blocked-by"
Content-Type: text/html
<p>This page is blocked in your country under the Example Media Act,
following order 2026-117 of the Example District Court.</p>
blocked-by names the party doing the blocking, such as an ISP, a CDN or the site itself, not the authority that ordered it. The body is the place for that.
What it doesn’t say
A 451 implies neither that the resource exists nor that it doesn’t: lift the demand and the request could still fail. And clients can’t rely on seeing one. RFC 7725 points out that some authorities demand a block and also demand that it not be disclosed.
Who sends it
GitHub answers 451 for repositories disabled by a DMCA takedown, on the web and in its API, and links to the published notice.
Caching
Unlike most errors, a 451 is cacheable by default: RFC 7725 says caches may reuse it unless the method or explicit cache controls say otherwise. If the block depends on where the visitor is, a shared cache that stores one country’s 451 can hand it to everyone. Send Cache-Control: private, or make sure the CDN’s cache key includes the country.
451, 403 or 404
a law or a court order forbids serving it 451 Unavailable For Legal Reasons
the site itself decided not to serve it 403 Forbidden
it doesn't exist 404 Not Found
A takedown under your own terms of service, or a moderation decision, is a 403 or a 404; save 451 for legal demands, so it keeps meaning something.
res.status(451) // Express
.set('Link', '<https://example.com/legal/blocks>; rel="blocked-by"')
.set('Cache-Control', 'private')
.send('Unavailable in your region under the Example Media Act, order 2026-117.');
Search 451 403 in the tool below to compare the two.