Skip to content

Kompile Learn

Referrer-Policy

Control how much of your page address is shared with other sites when visitors click a link.

What it is

When someone follows a link, the browser can tell the destination which page they came from. Full addresses can include private paths or tokens.

Why it matters

Reset-password links, search terms or account ids in your URLs can leak to every external site you link to.

How to fix it

nginx

add_header Referrer-Policy "strict-origin-when-cross-origin" always;

Apache

Header always set Referrer-Policy "strict-origin-when-cross-origin"

HTML (per page)

<meta name="referrer" content="strict-origin-when-cross-origin">

Does your site have this problem?

Kompile Scan checks for this and the other problems in these guides in under a minute. Free for one site.

Check my site