HTTP 451: content unavailable for legal reasons
In 2016, 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. Since the 3.1 release, Yoast SEO Premium supports 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 Yoast SEO Premium, you will get the following notice when you delete a post or page:
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!
Read more: How to properly delete a page from your site »
Coming up next!
-
Event
SMX Advanced Europe 2024
September 10 - 11, 2024 Team Yoast is at Attending SMX Advanced Europe 2024! Click through to see who will be there, what we will do, and more! See where you can find us next » -
SEO webinar
Webinar: How to start with SEO (August 13, 2024)
13 August 2024 Learn how to start your SEO journey the right way with our free webinar. Get practical tips and answers to all your questions in the live Q&A! All Yoast SEO webinars »