Skip to main content
HTTP/4xx (Client Error)

451 Unavailable For Legal Reasons

The resource cannot be served due to legal demands such as government censorship or court orders.

❓ Why does this happen?

Geo-blocking, DMCA takedowns, or sanctions compliance prevent access from the client's region.

✅ How to fix it

Nothing to fix technically; the operator must lift the legal restriction. Include a Link header pointing to the blocking authority.

Return or handle 451 in your stack

// app/api/resource/route.ts
export function GET() {
  return Response.json(
    { error: "Unavailable For Legal Reasons", status: 451 },
    {
      status: 451
    }
  );
}

Live 451 mock endpoint

Point your app, tests, or retry logic at this free public URL to reproduce a real 451 response (CORS enabled, optional ?delay=ms up to 5000).

https://castov.com/api/mock/451

Frequently Asked Questions

What does HTTP Status 451 mean?
The resource cannot be served due to legal demands such as government censorship or court orders.
Why am I getting a 451 status code?
Geo-blocking, DMCA takedowns, or sanctions compliance prevent access from the client's region.
How do I fix a 451 Unavailable For Legal Reasons error?
Nothing to fix technically; the operator must lift the legal restriction. Include a Link header pointing to the blocking authority.
How can I test how my app handles a 451 response?
Send a request to https://castov.com/api/mock/451 — it returns a real 451 Unavailable For Legal Reasons response with CORS enabled. Add ?delay=2000 to simulate a slow server.

Other 4xx status codes

Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.