Skip to main content

.htaccess Referrer Policy

Referrer Policy

The Referrer-Policy header is included in responses for resources that are able to request (or navigate to) other resources.

This includes commonly used resource types: HTML, CSS, XML/SVG, PDF documents, scripts, and workers.

note

To completely prevent the loss of referrers, specify the no-referrer value instead. Note that the effect may have a negative impact on analytics tools.

For example:

<IfModule mod_headers.c>
Header always set Referrer-Policy "strict-origin-when-cross-origin" "expr=%{CONTENT_TYPE} =~ m#text\/(css|html|javascript)|application\/pdf|xml#i"
</IfModule>

Table of Contents