HTTP 451 Unavailable For Legal Reasons

The server will not serve this resource for legal reasons — a court order, a government block or a takedown that applies to the requester.

Defined in RFC 7725 §3 — 451 Unavailable For Legal Reasons · MDN reference

Where you meet HTTP 451 in production

Content blocked in particular countries, takedowns under copyright law and court orders. The number is a nod to Ray Bradbury's Fahrenheit 451.

Why you would test it

Mainly a test of messaging: does your client tell the user the content is legally unavailable, rather than reporting a generic error or offering a retry?

What your client should do about a 451

Do not retry; it will not change. Show the explanation from the body. The response may name the blocking entity in a Link header with rel="blocked-by".

451 versus the codes it gets confused with

Endpoints that return 451

1 endpoint in this playground answers with 451. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 451

Why 451?
A reference to Ray Bradbury's Fahrenheit 451, the novel about censorship, suggested when the code was proposed.
Who sees a 451?
Often only requesters in a particular jurisdiction; the same URL can answer 200 elsewhere.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated