If you work in government and are asked to remove content from websites (as a result of executive orders), please use the HTTP status code 451 instead of 404.

451 is the correct status code to use for these cases, and you'll be doing the rest of the country a service by using it.

Addendum: you should also include a Link header with the link relation "blocked-by" that "Identifies the entity that blocks access to a resource following receipt of a legal demand."

rfc-editor.org/rfc/rfc7725.htm…

This entry was edited (1 month ago)

JB Carroll reshared this.

in reply to Ben Ramsey

This is mostly unnecessary hairsplitting, but I think it could be argued that semantically 451 is the correct code when the content is not removed but is blocked for YOU but not necessarily for everybody else (using geolocation or something else). I think that's why it's a 4xx client error.

So, if the pages are made unavailable for everybody (in other words, removed), I would say 404 is the correct code. Do I actually care? Absolutely not xD

in reply to Ben Ramsey

While I appreciate the cleverness of this idea, we need to do more.

If you're being forced to remove content from websites, please consider archiving the site yourself first.

Relatedly, here's a six minute video about Rene Carmille, a French archivist who foiled Nazi attempts to identity Jewish people:

youtube.com/watch?v=tOEFO1kU8r…

in reply to Ben Ramsey

rfc-editor.org/rfc/rfc7725.htm…
5. Security Considerations

Clients cannot rely upon the use of the 451 status code. It is possible that certain legal authorities might wish to avoid transparency, and not only demand the restriction of access to certain resources, but also avoid disclosing that the demand was made.

This entry was edited (1 month ago)