# 451 Unavailable For Legal Reasons

> https://http-status.org/docs/451

**Family:** 4xx Client Error

## Rationale

The user agent requested a resource that cannot legally be provided.

## In Plain Terms

This content is blocked by law or legal restrictions in your area. It's like a book that's banned in your country.

## Description

The HTTP 451 Unavailable For Legal Reasons status code indicates that the user-agent requested a resource that cannot legally be provided, such as a web page censored by a government. The response should include an explanation in the response body with details about the legal demand.

## Server Perspective

### Usage
- Return 451 for legally compelled blocks, takedowns, or jurisdiction-specific denials
- Use it when the denial is specifically legal in nature rather than a generic policy decision
- Government censorship or takedown requests
- Court-ordered content removal
- Geographic legal restrictions
- Copyright-related content blocking
- Regulatory compliance blocking

### Implementation
- Include a human-readable explanation in the response body
- Optionally include Link with rel="blocked-by" to identify the entity implementing the block

### Common Headers
- Link

### Body
- Include a concise legal-block explanation and safe metadata about the restriction when appropriate.

### Pitfalls
- Do not use 451 for ordinary company policy or permission denials; use 403 instead
- Do not use the blocked-by Link relation to identify the legal demander when the body should explain that context
- General access denied (use 403 Forbidden)
- Resource doesn't exist (use 404 Not Found)
- Company policy restrictions (use 403 Forbidden)
- Authentication required (use 401 Unauthorized)

## Client Perspective

### Pitfalls
- Do not treat 451 like a routine permission error

## Examples

### Government content blocking

Content blocked due to government censorship laws

**Request:**
```
GET https://api.example.test/political-content
```

**Response:**
```
451 Unavailable For Legal Reasons
Content-Type: application/json
Link: <https://spqr.example.org/legislation>; rel="blocked-by"

{
  "error": "unavailable_for_legal_reasons"
}
```

### DMCA copyright takedown

Content removed due to copyright infringement claim

**Request:**
```
GET https://api.example.test/copyrighted-video
```

**Response:**
```
451 Unavailable For Legal Reasons
Content-Type: application/json

{
  "error": "unavailable_for_legal_reasons"
}
```

## Related Codes

- [403 Forbidden](/docs/403.md)
- [404 Not Found](/docs/404.md)

