Stumbled across http error response 451 one of these days. How many of you know this? I didn’t. Have you used it or handled it?

For all my years working with technology, internet and the umpteen years of sending and receiving http request and response, I mostly cared about the 200, 404 and stuff. It never even crossed my mind to cross check whether there is a new one, until the other day when I came across an article on blocked websites, censorship and the internet freedom debate.

Well, we used to use 403 forbidden to check denied access to website. But with governments blocking websites or access due to legal issues and other lawsuits, there arose a need to have a specific error to handle this.

“403 Forbidden message appears when a court has ordered a website to be blocked. 403 Forbidden is supposed to appear when a website wants to refuse access to somebody.

403 Forbidden shouldn’t be shown when a site is blocked for legal reasons. That’s not what it’s meant for.

People should know that 403 Forbidden only means that the site wants to deny them access.

Error 451 would let people know that a court ordered the site to be blocked. This might be because it contains restricted political content or carries copyright material.”

So from the above, we realize that there is a need to classify forbidden due to what reason?

Error 451 – is http status code for use when resource access is denied as a consequence of legal demands. It is used when a server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource. This status code can be used to provide transparency in circumstances where issues of law or public policy affect server operations. This transparency may be beneficial both to these operators and to end users.

With that mind, we expect a message as below when 451 is thrown by ISPs or end sites.

   HTTP/1.1 451 Unavailable For Legal Reasons
   Link: <https://spqr.example.org/legislatione>; rel="blocked-by"
   Content-Type: text/html

    <head><title>Unavailable For Legal Reasons</title></head>
<h1>Unavailable For Legal Reasons</h1>
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.


“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.”

‘When an entity blocks access to a resource and returns status 451, it SHOULD include a “Link” HTTP header field [RFC5988] whose value is a URI reference [RFC3986] identifying itself. When used for this purpose, the “Link” header field MUST have a “rel” parameter whose value is “blocked-by”. ‘


Trivia – Understanding the origin

With the technicalities discussed, you may wonder why 451 and not any other number, say 432 the next possible number in the series.

It is inspired by Ray Bradbury’s fiction, Fahrenheit 451, which looks at a dystopian future, which tells of a world where books are banned and burned and fireman don’t put fires out but start them. In the Internet world, though checks and balances are needed, an overarching sense of nervousness and fear is needed before a censorship is imposed on a site. In many cases, law may not be transparent or inducing fear in the rest of the open internet populace. Hence, it is important to remind everyone of the importance of openness and transparency in the Internet world. With all this mind, Tim Bray, a fan of Bradbury’s writing, recommended to the Internet Engineering Task Force, which governs such choices, that when access to a website is denied for legal reasons the user is given the status code 451.


References quoted above come from below links:

  1. http://www.451unavailable.org/what-is-error-451/
  2. https://tools.ietf.org/html/rfc7725
  3. http://www.theguardian.com/books/2012/jun/22/ray-bradbury-internet-error-message-451
  4. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes