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."

https://www.rfc-editor.org/rfc/rfc7725.html

RFC 7725: An HTTP Status Code to Report Legal Obstacles

@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

@jakeRaccoon @ramsey I don't think that's correct. Although that's the example used in the RFC, the rest of the RFC uses language like "many" instead of "all," so I don't think they intended this to be a limitation.
@curtmack Oh, I don't think the RFC intends to limit or discourage using 451 in cases like this. But for me 404 still sounds more semantically correct when the content has actually been removed from the server and is unavailable to all users, even if the removal was due to legal reasons.