HTTP 451 — Unavailable For Legal Reasons
HTTP 451 — named for Fahrenheit 451 — is censorship made visible: the resource is withheld because of a legal demand, and the response should point at the authority that compelled the block.
When 451 shows up
- Region-blocked content behind court orders or statutes.
- Search engines and platforms honouring takedown demands transparently.
Mocking a 451 response
A response with this status can be faked end to end with a local mock rule — no backend changes needed. The configuration below mirrors the rule fields the ApiSimul editor uses (method, path, status, delay in milliseconds, response body):
{
"method": "GET",
"path": "/content/article",
"status": 451,
"delay": 180,
"enabled": true,
"body": {
"error": "unavailable_for_legal_reasons",
"authority": "example notice"
}
}Dynamic placeholders such as {{random.name}}, {{string.uuid}} or {{number.int 1 100}} can appear inside the body to vary each response, which keeps client-side list rendering and retry logic honest during development.
Frequently asked questions
What does HTTP 451 mean?
Access is denied for legal, not technical, reasons. The Link header or body typically identifies the demanding authority.
How can I test a 451 response without a real backend?
Define a mock rule with the method and path your client requests and set the status to 451. The example configuration above returns this response after the listed delay, so the client exercises its 451 handling exactly as it would against a live server.
Related status codes
Need the response in your own project? Spin up rules for any status with the ApiSimul mock server, or browse every status code page.