1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Status Codes

  1. 451 Unavailable For Legal Reasons
    1. Writing responses (servers)
    2. Reading responses (clients)
    3. Overview table
    4. Examples
      1. Specification example
      2. GitHub

451 Unavailable For Legal Reasons

451 (Unavailable For Legal Reasons) status code indicates a resource or server is inaccessible or censored under threat of legal action or other great threat against the server operator.

Writing responses (servers)

Use 451 Unavailable For Legal Reasons if legal authorities have demanded content be taken down under some sort of threat of legal action:

  • DMCA Takedown

This can be implemented at a router level, before any resource is dereferenced, or set as a custom status code on a document, similar to handling for 410 Gone.

If available, attach a link with the blocked-by link relation, linking to the entity or order blocking the request (see example).

Reading responses (clients)

This status indicates the request cannot be filled because of an outstanding legal demand. It can be a result of any aspect of a request, or applied to an entire server, and it does not imply the request would succeed even if the legal demand were lifted. As such, short of Skynet, WOPR, or a similar automated legal response system, there is no way to automatically fix a 451 error.

The resource might still be available from another party, or in a different legal jurisdiction. If desired, seek the advice of a local lawyer on how you might advise you on the risks and benefits of various courses of action.

Overview table

Name
451
Message
451 Unavailable For Legal Reasons
Description
The request cannot be filled due to a legal demand.
Specification
RFC 7725: An HTTP Status Code to Report Legal Obstacles

Examples

Specification 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>

GitHub

GitHub uses the 451 status code when returning pages subject to a DMCA takedown. All pages that would ordinarily return 200 return 451 Unavailable for Legal Reasons. Notice how the page links to the request causing the blocked page, and instructions on how to counter-request.