Set a Referrer-Policy
Updated 1 Dec 2026
What it means
Without a Referrer-Policy, full page URLs (which can include search terms, IDs or reset tokens) are sent to every third-party site your users click through to.
Why it matters
Leaks customer data and internal URLs to third parties; can conflict with GDPR/DPDP data-minimisation expectations.
How to fix it
- Send Referrer-Policy: strict-origin-when-cross-origin (a safe default supported by all browsers).
Configuration examples
nginx
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Apache
Header always set Referrer-Policy "strict-origin-when-cross-origin"
IIS (web.config)
<add name="Referrer-Policy" value="strict-origin-when-cross-origin" />
Node.js / Express
app.use(helmet.referrerPolicy({ policy: 'strict-origin-when-cross-origin' }));
Django (settings.py)
SECURE_REFERRER_POLICY = 'strict-origin-when-cross-origin'
Laravel / PHP
$response->headers->set('Referrer-Policy', 'strict-origin-when-cross-origin');
Any platform
Referrer-Policy: strict-origin-when-cross-origin
Check your fix
curl -sI https://YOUR_DOMAIN | grep -i referrer-policy
References
- https://developer.mozilla.org/docs/Web/HTTP/Headers/Referrer-Policy