Did you just try to visit a website only to be met by a message that says Error 451: Unavailable Due to Legal Reasons?
In a nutshell, this error message indicates that the website owner or your local government/authority has blocked access to the website in order to comply with the law in the country from which you’re browsing, even though the website itself might still be working for other visitors.
However, if you really need to access the site, there are some ways that you can “fix” (or bypass) this error message to still view the website in question.
In this article, we’re going to cover everything that you need to know about the Error 451: Unavailable Due to Legal Reasons message.
Check Out Our Video Guide to Fixing The 451 Error
What Is Error 451: Unavailable Due to Legal Reasons?
The Error 451: Unavailable Due to Legal Reasons message is an HTTP error code that displays when the website you’re trying to access has been blocked by the government/authority of the country from which you’re browsing OR when the website owner has blocked you in order to comply with laws.
The error code – 451 – is a reference to Ray Bradbury’s sci-fi novel, Fahrenheit 451. Because of this, you’ll also see Error 451 sometimes called the “censorship error.”
In the error message, you should see details about the name of the organization requesting the block, along with the reasons for the block.
Here’s a humorous example from Mozilla that’s based on Monty Python’s Life of Brian:
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>
Click to Tweet
What Causes Error 451: Unavailable Due to Legal Reasons?
Unlike pretty much all other HTTP errors, the Error 451: Unavailable Due to Legal Reasons message usually has nothing to do with either the website server (hosting) or the client (usually your web browser).
Instead, the error usually means that your internet service provider (ISP) has blocked the site at a network level.
The website could be functioning perfectly normally and your browser could be functioning perfectly normally, but you’ll still get this error because the ISP that you’re using for internet service has blocked the website.
In some cases, the website that you’re trying to visit might display the error by itself in order to comply with a legal order or avoid legal issues, even without the ISP’s involvement. For example, a small number of sites block European traffic and display this error message because the sites don’t want to comply with the GDPR. You can see an example of this in the screenshot from the previous section.
Either way, the important detail to understand is that the error is not caused by any widespread issue on the website or your computer – it’s specifically because of compliance with a law or legal order.
How To Fix Error 451: Unavailable Due to Legal Reasons
Because the Error 451: Unavailable Due to Legal Reasons message indicates that a website is blocked for legal reasons, there’s not necessarily any way to “fix” it in most cases (short of hiring a lawyer and going to court).
However, if you’re trying to access someone else’s website, there are several ways that you can effectively bypass the Error 451: Unavailable Due to Legal Reasons message.
1. Use a VPN (Virtual Private Network)
Using a virtual private network (VPN) can let you bypass the error 451 message by encrypting your connection and routing it through a server in a different country.
Because it looks like you’re browsing from a different country and your ISP is no longer able to see what sites you’re looking at, you should be able to access the site.
Just make sure that you choose a VPN server in a country that isn’t blocked. For example, if you live in France and you’re trying to access a website that blocks European traffic because of the GDPR, choosing a VPN server in Germany won’t solve the problem because German visitors are also blocked. However, choosing a VPN server in the USA would.
To learn more, you can read our full guide on how a VPN works.
If you’re on a tight budget, you can use a free VPN such as ProtonVPN. Or, for more connection options and features, you can consider a paid VPN service such as NordVPN, ExpressVPN, or others.
2. Change Your DNS Resolvers to Cloudflare
Whenever your computer/web browser tries to connect to a website, it needs to use DNS resolvers to look up the IP address of the actual server behind the site’s domain name.
In some situations, you might be seeing the Error 451 because your ISP is blocking the website via the default DNS resolvers that your computer uses.
To try to bypass this, you can use a different DNS resolver. We recommend Cloudflare 1.1.1.1 as the best option, as it’s 100% free and privacy-friendly.
Google also offers its own public DNS resolver, which can be another option to consider.
Cloudflare maintains detailed instructions for how to change the DNS resolver for all popular operating systems and devices. You can find them by going here and scrolling down to the “Setup on…X” section:
3. Enable HTTPS
In some cases, switching to the HTTPS version of a site instead of the HTTP version might help you to bypass the Error 451 message.
Without HTTPS, the data that passes between your web browser and the website is available to anyone sitting in the middle, including your ISP.
With HTTPS, that data is encrypted in transit, which means that your ISP and others can’t snoop on the actual data (though your ISP can still see the site that you’re connecting to, which is why this fix isn’t enough most of the time and a VPN offers more protection).
To see if this will work for your situation, try changing the http part of the domain name to https. If that works, you can use an extension like HTTPS Everywhere to try and automatically force HTTPS usage whenever possible.
4. Use a Proxy Server
Using a proxy server provides another way to route your browser connection through a different server, which can help you bypass the error 451 block.
It works similarly to a VPN, but there are some important differences between a proxy server vs a VPN.
In general, we recommend using a VPN instead of a proxy server whenever possible because quality VPN services are more secure and privacy-friendly. If you’re using a VPN, you do not need a proxy server because the VPN already accomplishes the same thing.
However, if you’re unable to use a VPN for some reason, a proxy server provides another alternative that usually won’t cost any money.
5. Use Tor Browser
For a virtually foolproof way to get around government blocks, you can use Tor via the Tor Browser.
Tor was built by the United States Naval Research Laboratory specifically to protect communication online.
It works by bouncing your connection through a random path of relay servers in the Tor network. Because everything is encrypted and there’s no way to see where the connection originated from, Tor will help you get around the error 451 message (as well as most other types of online censorship).
This is why we recommend Tor Browser as one of the most secure web browsers.
Seeing this error message but still need to access the site? Read on… 👀Click to Tweet
Summary
The Error 451: Unavailable Due to Legal Reasons message indicates that the website you’re trying to visit has been blocked by the government or other “legal obstacles”.
The website could be functioning normally. However, if the authority in your country has issued a legal order, your internet service provider (ISP) can block your access to the site by displaying the Error 451: Unavailable Due to Legal Reasons message.
In some cases, the website owner might display the error code itself to comply with local laws, rather than relying on the ISP. Again, one example is a small number of sites proactively blocking European traffic to avoid complications with GDPR compliance.
To bypass the Error 451 message, you can use tactics that hide your browsing location, such as a VPN, proxy, or Tor Browser. In some cases, changing your DNS provider to Cloudflare or accessing the HTTPS version of the site might also work.
For my web page, I have a .htaccess
document which looks like this
<Files .htaccess>
order allow,deny
deny from all
</Files>
ErrorDocument 404 /websites/404/index.php
Now as far as I understand it you can include further ErrorDocument
by just adding another line. For example
<Files .htaccess>
order allow,deny
deny from all
</Files>
ErrorDocument 404 /websites/404/index.php
ErrorDocument 503 /websites/maintenance/index.php
However, when I try to add a page for HTTP 451 using the following line of code ErrorDocument 451 /websites/451/index.php
and I reload my page I get a Server error! Error 500
. I later found out this was because XAMPP was no longer picking up my folder with the .htaccess
file in and the error could only be resolved by removing the ErrorDocument
for error 451
. What is causing this and how can I fix it?
Note
I also found that this happens for error 418: I'm a teapot
as well
Edit
Just to include a little more information about the software I am using. I am using
- XAMPP Control Panel v3.2.2
- Apache 2.4.17 — This is the version which comes with XAMPP
YakovL
7,60712 gold badges63 silver badges102 bronze badges
asked Aug 7, 2016 at 7:33
5
Even though there are a lot of HTTP status codes (which are officially maintained by the IANA), not all webservers support all of these. As of Apache 2.4, the status codes 418 and 451 are not supported and silently converted to error 500 by Apache.
The latest additions of supported status codes in Apache 2.4 are 414 and 501 and a crash prevention for 400 (from Apache 2.4 change log):
core: Support custom ErrorDocuments for HTTP 501 and 414 status codes.
PR 57167 [Edward Lu ]core: Prevent a server crash in case of an invalid CONNECT request with
a custom error page for status code 400 that uses server side includes.
PR 58929 [Ruediger Pluem]
See the list of supported HTTP status codes (as of Apache 2.4.4).
See an older bug (filed against 2.2) regarding remapping of custom status codes to 500 errors.
See this previous question regarding a similar problem (but also with Apache 2.2).
answered Aug 9, 2016 at 9:06
PaulPaul
8,9723 gold badges28 silver badges48 bronze badges
1
From your link to Wikipedia it states:
It (451) was approved by the IESG on December 18, 2015.[8] It was
published as RFC 7725 in February 2016.
The 451 status might be recent enough that Apache (or other vendors which mod_rewrite relies on) haven’t included support for the status code yet. There’s a June 2016
bug report with Red Hat Enterprise - httpd-2.4.6-40
for example that looks to be still open: https://bugzilla.redhat.com/show_bug.cgi?id=1343582
answered Aug 9, 2016 at 9:06
William IstedWilliam Isted
11.7k4 gold badges30 silver badges45 bronze badges
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 Response::HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
.NET HttpStatusCode.UnavailableForLegalReasons
Rust http::StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS
Rails :unavailable_for_legal_reasons
Go http.StatusUnavailableForLegalReasons
Python 3.5+ http.HTTPStatus.UNAVAILABLE_FOR_LEGAL_REASONS
Apache HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_UNAVAILABLE_FOR_LEGAL_REASONS
Angular @angular/common/http/HttpStatusCode.UnavailableForLegalReasons
451 status code example
Here is an example of a 451 status code:
Request
GET /example-page HTTP/1.1
Host: www.example.com
Response
HTTP/1.1 451 Unavailable For Legal Reasons
Content-Type: text/html; charset=utf-8
<html>
<head>
<title>451 Unavailable For Legal Reasons</title>
</head>
<body>
<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>
</body>
</html>
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.
Additional resources
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs
- W3Schools
Return to List of HTTP Status Codes
Officially, HTTP response status code 451 Unavailable For Legal Reasons is returned by the server to indicate that the content requested is unavailable due to a legal or legislated demand.
The response is cacheable by default. If the default behavior needs to be overridden then the response must include the appropriate HTTP caching headers.
In addition the HTTP status code 451 Redirect is also used by Microsoft Exchange ActiveSync when the client is attempting to connect to the wrong server, or if there is a more efficient server available to reach the user’s mailbox.
Table of Contents
- Usage
- Microsoft Exchange ActiveSync Usage
- Example
- Code references
- Takeaway
- See also
Usage
When the 451 Unavailable For Legal Reasons status code is received, the server is not confirming nor denying the existence of the resource. Rather, it indicates a refusal to grant access due to a legal demand, and it is permitted to state as much.
Essentially, the resource is being blocked due to censorship, and the HTTP status code pays homage to the Ray Bradbury novel about this topic, Fahrenheit 451.
Examples of where the 451 Unavailable For Legal Reasons response status applies will depend on the laws of the country from which it is being accessed. Some examples include copyright infringement, privacy violations, and gambling sites. Any situation where there is a court order, such as a publication ban, can use this HTTP status code. The 403 Forbidden response status is the more general version of the error.
The transparency afforded by this HTTP status code allows for the easier third-party collection of statistics related to the number, and perhaps a category of sites that are taken down due to censorship.
In some cases, clients can still access the resources by using alternative methods. For example, a VPN or the Tor network can be used to shroud one’s point of origin, or a proxy server can be used to redirect browser traffic to another country.
As part of the response, the server has to include a Link header that identifies the party that blocked the request. Importantly, this is the group responsible for blocking the content, and not the group who mandated it. Information about who set the policy can be included in the message body.
Note
Search engines like Google will not index a URL with 451 Unavailable For Legal Reasons response status, and consequently, URLs that have been indexed in the past but are now returning this HTTP status code will be removed from the search results.
Microsoft Exchange ActiveSync Usage
When the 451 Redirect error message is received, it means that the client is attempting to connect to the wrong server. This is either because the user’s mailbox cannot be accessed from this server or alternatively, there is a more efficient server than can be used.
If there is an X-MS-Location
header included in the response then subsequent requests are required to use that address instead. If the X-MS-Location
header is not included then the full Autodiscover process is followed.
Example
In the example, the client requests a resource and the server responds with the 451 Unavailable For Legal Reasons.
Request
GET /tech-trial-updates HTTP/1.1
Host: www.example.re
Response
HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://www.example.re/legaldept>; rel=”blocked-by”
Content-Type: text/html
Content-Length: 174
<html>
<head>
<title>Publication Ban</title>
</head>
<body>
<p>The content that you have requested is unavailable due to a government-ordered publication ban.</p>
</body>
</html>
Code references
.NET
HttpStatusCode.UnavailableForLegalReasons
Rust
http::StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS
Rails
:unavailable_for_legal_reasons
Go
http.StatusUnavailableForLegalReasons
Symfony
Response::HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
Python3.5+
http.HTTPStatus.UNAVAILABLE_FOR_LEGAL_REASONS
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_UNAVAILABLE_FOR_LEGAL_REASONS
Angular
@angular/common/http/HttpStatusCode.UnavailableForLegalReasons
Takeaway
The 451 Unavailable For Legal Reasons status code is a client error that is sent by the server when the client requests a document for which access is not allowed by them or from within their geo location and/or locale.
In the case of 451 Redirect issued by Microsoft Exchange ActiveSync, it implies that the client is attempting to connect to the wrong server to access their mailbox.
See also
- 403 Forbidden
- RFC 7725
- Microsoft Exchange ActiveSync HTTP 451 Error
Last updated: August 2, 2023
451 недоступно по юридическим причинам
451 недоступно по юридическим причинам
Код ответа об ошибке клиента протокола передачи гипертекста (HTTP) 451 Unavailable For Legal Reasons
указывает на то, что пользователь запросил ресурс, который недоступен по юридическим причинам, например веб-страницу, в отношении которой был возбужден судебный иск.
Status
451 Unavailable For Legal Reasons
Example
Этот пример ответа взят из IETF RFC (см. Ниже) и содержит ссылку на книгу Монти Пайтон «Жизнь Брайана» .
Примечание: Link
заголовок может также содержать rel="blocked-by"
отношению идентификации субъекта и реализации засорение, а не какой — либо другой объект под мандат его.
Любая попытка идентифицировать объект, в конечном итоге ответственный за недоступность ресурса, относится к телу ответа, а не rel="blocked-by"
ссылке rel = «blocked-by» . Сюда входит имя человека или организации, которые по закону потребовали удалить контент.
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>
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox для Android | Opera Android | Safari на IOS | Samsung Internet | |
451 |
Yes |
12 |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
See also
- Википедия:HTTP 451
- Википедия: 451 градус по Фаренгейту (который дал этому коду статуса его номер)
HTTP
-
429 Слишком много запросов
Код состояния ответа HTTP 429 Too Many Requests указывает, что пользователь отправил заданное количество времени («ограничение скорости»).
-
431 Поля заголовка запроса Слишком большие
Код состояния ответа HTTP 431 Request Header Fields Too Large указывает на то, что сервер отказывает в обработке из-за длинных заголовков запроса.
-
500 Ошибка внутреннего сервера
Код ответа HyperText Transfer Protocol (HTTP)500 Internal Server Error указывает на то,что возникшее непредвиденное условие не позволило выполнить работу.
-
501 Не выполнено
Код ошибки ответа сервера HyperText Transfer Protocol (HTTP)501 Not Implemented означает,что не поддерживается функциональность,необходимая для выполнения запроса.