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

So... I can't get information due to a client-side problem? I get the literary reference, but 4xx indicate client configuration problems. Even if one's mingling SMTP codes' structure, 451 would imply a transient condition ...which feels unduly optimistic.

@ferricoxide RFC 7725 defines status code 451 as "Unavailable For Legal Reasons."

"This status code indicates that the server is denying access to the resource as a consequence of a legal demand."

In this case, pedantic arguments about the differences between 4xx and 5xx are moot, since there's an RFC that defines the status code. If I were making up this status code on the spot, I might agree with you. πŸ™‚

@ferricoxide But it is sort of like a 404, though. The client has requested a resource that the server cannot serve, which is a client problem, not a server problem.
@ramsey This is really deep. You want access to forbidden knowledge, something is wrong with YOU
@ferricoxide