Utilo

HTTP 451 Unavailable For Legal Reasons – Free, Online, Private

451 Unavailable For Legal Reasons means the server refuses to provide the resource because of a legal demand.

What HTTP 451 means

451 says the resource is unavailable for legal reasons. RFC 7725 defines it. The body should explain the demand, and a Link header with rel="blocked-by" can point at the authority. It is not a technical failure and not a judgment you hide inside 403 if you want clients and operators to see that the block is legal rather than discretionary. The number is a reference to Fahrenheit 451.

451 Unavailable For Legal Reasons belongs to the 4xx client error class. Clients that only look at the class will group it with its neighbors. Clients that care about the exact code should use the narrower rule on this page, because the class is only the first digit.

When you see HTTP 451

When you see HTTP 451 Unavailable For Legal Reasons, stop on that exact status line. 451 Unavailable For Legal Reasons means the server refuses to provide the resource because of a legal demand. The trace that usually produces it: A court or agency required the resource to be blocked in a jurisdiction. The 4xx client error class only tells you the first digit. A neighbor in that class is a different fault, and the fix on this page does not transfer to it.

Return 451 when you are withholding the resource because of a legal demand and you are willing to say so. Use 403 for an ordinary permission refusal. Do not use 451 as a witty 403. If a specific legal process requires a specific notice, put that notice in the body. Identify the blocked resource if you can do so without violating the demand.

How to fix HTTP 451

To fix HTTP 451, change the condition that made the server choose Unavailable For Legal Reasons. Do not retry. Show the explanation. Do not treat 451 as a signal to fetch the same URL from a different account. The block is about the resource and the legal demand, not about a transient outage. Do not retry. The status will not clear until the legal situation changes. If the log line is a different code, leave this page. The mix-up people make with 451 is this one: 403 is a policy or permission refusal you chose. 404 hides the resource. 503 is an outage. 451 is a legal block with a defined place to explain it.

  • The body omitted the reason and users assumed the site was broken.
  • A client retried 451 as if it were a 503.
  • A global block was applied when only one region was covered by the demand.

An access log that only stores 451 is not enough to tell these apart. Keep the method, the path, and a request id. Do not keep the Authorization header or a request body that might be a token. The status explains the outcome. It is not a place to echo secrets back to the client either.

Example response

HTTP 451 Unavailable For Legal ReasonsHTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://example.com/legal>; rel="blocked-by"
Content-Type: text/html

The Link header points at an explanation the demanding authority or you published. The HTML body should be readable by a person. An API can return JSON with the same information. Do not include the withheld content in the error body.

What the client should do

Do not retry. Show the explanation. Do not treat 451 as a signal to fetch the same URL from a different account. The block is about the resource and the legal demand, not about a transient outage.

Caches may store 451. That can be desirable, so every user in scope sees the notice, or undesirable if the demand is narrower than the cache key. Set Cache-Control to match the scope of the block.

Do not retry. The status will not clear until the legal situation changes.

Codes people confuse with HTTP 451

403 is a policy or permission refusal you chose. 404 hides the resource. 503 is an outage. 451 is a legal block with a defined place to explain it.

Frequently asked questions

Is 451 just 403 with a literary number?

No. It specifically marks a legal demand, with a defined Link relation for the authority.

What should the body say?

Why the resource is unavailable, and who required that, if you are allowed to say.

Should clients retry?

No.

Can a cache store it?

Yes, and you should set the cache scope so a regional demand is not shown to everyone.

What should I do first when I see HTTP 451?

Read the status as 451 Unavailable For Legal Reasons specifically. 451 Unavailable For Legal Reasons means the server refuses to provide the resource because of a legal demand. Then check the cause that matches the request you sent, starting with: A court or agency required the resource to be blocked in a jurisdiction.