451 Unavailable For Legal Reasons
Meaning
The server is denying access to the resource as a consequence of a legal demand (for example, censorship or government-mandated blocked content).
When to Use
When access to a resource is blocked due to legal reasons – such as a court order, law, or regulation – and the server is giving an explicit status code to indicate this. Often used to transparently inform the user that the resource is intentionally unavailable for legal compliance.
Example
A website hosted in one country returns 451 Unavailable For Legal Reasons to users from a region where a specific page or item has been legally prohibited (e.g., a news article censored by law). The response might include an explanation or link to the legal authority.
When Not to Use
Do not use for general authorization or authentication issues. Only use 451 when there's a legal or policy reason preventing access. If a resource is removed or unavailable for non-legal reasons, use other appropriate codes (404, 410, etc.).
Source
RFC 7725