What Is a 451 Status Code?
The server is denying access to the resource as a consequence of a legal demand.
The server in question might not be an origin server. This type of legal demand typically most directly affects the operations of ISPs and search engines.
Responses using this status code SHOULD include an explanation, in the response body, of the details of the legal demand: the party making it, the applicable legislation or regulation, and what classes of person and resource it applies to. For example:
HTTP/1.1 451 Unavailable For Legal Reasons Link: <https://spqr.example.org/legislatione>; rel="blocked-by" Content-Type: text/html <html> <head> <title>Unavailable For Legal Reasons</title> </head> <body> <h1>Unavailable For Legal Reasons</h1> <p>This request may not be serviced in the Roman Province of Judea due to the Lex Julia Majestatis, which disallows access to resources hosted on servers deemed to be operated by the People's Front of Judea.</p> </body> </html>
The use of the 451 status code implies neither the existence nor non- existence of the resource named in the request. That is to say, it is possible that if the legal demands were removed, a request for the resource still might not succeed.
Note that in many cases clients can still access the denied resource by using technical countermeasures such as a VPN or the Tor network.
A 451 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls; see RFC7234.
- Source: RFC 7725
451 CODE REFERENCES
Symfony HTTP Status Constant
Apache HttpComponents Core
451 status code example
Here is an example of a 451 status code:
GET /example-page HTTP/1.1
HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: text/html; charset=utf-8
<title>451 Unavailable For Legal Reasons</title>
<h1>Unavailable For Legal Reasons</h1>
<p>The requested resource is unavailable due to legal reasons or censorship.</p>
<p>Contact your local authorities or website administrator for more information.</p>
In this example, the client has requested the webpage located at
/example-page on the
www.example.com server. However, the server responds with a 451 status code, indicating that the resource is unavailable due to legal reasons or censorship. The response includes a simple HTML page with a title and message explaining the reason for the unavailability and suggests contacting the local authorities or website administrator for more information.
How to fix a 451 status code
Unfortunately (and in most cases), the server returning a 451 status code is not within the control of the website owner, and the unavailability of the resource is due to legal reasons or censorship. As a result, it is typically not possible for the website owner to directly fix a 451 status code.
If the website owner believes that the blocking of their website or resource is in error or they have resolved the legal issue that caused the resource to be blocked, they may need to work with the appropriate authorities or Internet Service Providers (ISPs) to have the block lifted.
Alternatively, if the website owner wishes to make the resource available in a different location or jurisdiction where the legal issue does not apply, they may need to move the resource to a different domain or server.
It is important to note that any attempts to circumvent or bypass legal blocks or censorship could result in legal consequences, and website owners should seek legal advice before taking any actions.
Who created the 451 status code?
The 451 status code was proposed in 2012 by Tim Bray, a Google engineer, and was officially approved by the Internet Engineering Steering Group (IESG) in 2015 as an HTTP status code. The purpose of this status code is to provide more transparency about why a website or resource is not available, particularly in cases where governments or other authorities are responsible for blocking access.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs