# HTTP 451 Unavailable For Legal Reasons — Meaning, Causes & Fixes

> Access is denied because of a legal demand, such as a court order or a government block.

451 — a nod to Ray Bradbury's Fahrenheit 451 — was standardised in RFC 7725 so that legal blocks are transparent. Instead of a vague 403 or 404, the server says the content is unavailable because of a legal obligation, and can identify who demanded it with a `Link: <…>; rel="blocked-by"` header.

- Class: 4xx Client Error
- Retry: No — change the request first
- Cacheable by default: no
- Defined in: [RFC 7725 — An HTTP Status Code to Report Legal Obstacles](https://www.rfc-editor.org/rfc/rfc7725)

## Example response

```http
HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: application/json
Content-Length: 41

{"error":"Unavailable For Legal Reasons"}
```

## Common causes

- Court-ordered takedowns, or government blocking in certain countries.
- Sites blocking regions where they can't meet legal requirements — some US news sites returned 451 to EU visitors when GDPR took effect.

## How to fix it

1. As a visitor, there's usually nothing to fix: the block is deliberate.
2. As an operator, explain the block in the body and include the `blocked-by` Link header.

## Send a 451 from your server

### Express

```
res.status(451).json({ error: "Unavailable For Legal Reasons" });
```

### Next.js route handler

```
return Response.json({ error: "Unavailable For Legal Reasons" }, { status: 451 });
```

### Flask

```
return {"error": "Unavailable For Legal Reasons"}, 451
```

### Go net/http

```
http.Error(w, "Unavailable For Legal Reasons", http.StatusUnavailableForLegalReasons)
```

### nginx

```
return 451;
```

## FAQ

### Why the number 451?

It references Fahrenheit 451, Ray Bradbury's novel about book burning — fitting for a status code about censorship.

## Related status codes

- [403 Forbidden](https://www.devkult.com/http/403.md)
- [404 Not Found](https://www.devkult.com/http/404.md)
- [410 Gone](https://www.devkult.com/http/410.md)

Open the interactive page: https://www.devkult.com/http/451