HTTP 451: content unavailable for legal reasons
At the end of last year, a new HTTP status code saw the light. This status code, HTTP 451, is intended to be shown specifically when content has been blocked for legal reasons. If you’ve received a take down request, or are ordered by a judge to delete content, this is the status code that allows you to indicate that. The upcoming Yoast SEO Premium 3.1 release will have support for this new status code, allowing you to set a HTTP 451 status code for pages.
What does HTTP 451 mean?
The HTTP 451 header is introduced with the specific meaning of making it explicitly clear when content is blocked for legal reasons. Or, in the wording of the official draft:
This status code can be used to provide transparency in circumstances where issues of law or public policy affect server operations.
While the end result is the same as for instance a 403 Forbidden status code, this status code makes it much clearer what is happening. It might make you search for something just a little bit deeper. The original idea stems from this blog post which is worth a read.
How to set an HTTP 451 header
There are two ways to set an HTTP 451 header:
Deleting the post or page
In the upcoming Yoast SEO Premium 3.1 release we’ve changed what happens when you delete a post or page. You will now get the following notice:
The link underneath “Read this post” links to my earlier article about what to do when deleting a post or page. Because we’re assuming that most of the time when you delete content, it has nothing to do with a court order (we sure hope so), we haven’t added the 451 option here.
Creating a header without deleting the post or page
You can also just keep the post or page alive, which is especially useful if the court order, injunction or whatever it is that is forcing you to block the page, has a time restraint. Simply go into the redirects screen of Yoast SEO and create a 451 header for that specific URL:
An HTTP 451 template file
Along with the changes that allow you to set a 451 HTTP header, we’ve also created the option to have an HTTP 451 template file in your theme. It’s as simple as copy pasting the 404.php file in your theme to 451.php and modifying the content to have a good message.
I honestly hope you’ll never need this HTTP error, but if you do, you know now that you can do the right thing, provided you’re using Yoast SEO Premium!