What Link header should be included with HTTP 451?
RFC 7725 recommends `Link: <URL>; rel="blocked-by"` identifying the entity implementing the block.
HTTP 451 Unavailable For Legal Reasons indicates a resource is blocked due to a legal demand, court order, DMCA takedown, or regional regulatory restriction (such as GDPR/sanctions geo-blocking).
location /restricted-content {
add_header Link "<https://example.com/legal-notice>; rel="blocked-by"" always;
return 451 "Unavailable for legal reasons in your region.";
}
curl -i -sS https://example.com/restricted-content
RFC 7725 recommends `Link: <URL>; rel="blocked-by"` identifying the entity implementing the block.
Google treats 451 similarly to 404/410 and removes the blocked URL from search results in affected regions.
Use 451 when the restriction is specifically due to legal or regulatory requirements; use 403 for general authorization or WAF blocks.