Referrer-Policy Header Generator
Free online Referrer-Policy header generator. Works entirely in your browser.
Loading tool...
What is Referrer-Policy Header Generator?
The Referrer-Policy Header Generator helps you declare how much referrer information browsers may share when visitors leave your site. It explains all 8 W3C directives in plain language, shows a per-scenario matrix of what actually gets sent, and generates copy-paste snippets for nginx, Apache, Express, and the HTML meta tag. Everything runs locally in your browser with no signup.
Key Benefits
- Prevent full URLs, query strings, and tokens from leaking to third-party sites and insecure HTTP pages.
- Meet OWASP security headers and privacy best practices with one explicit declaration.
- Keep full URLs in your own analytics while sharing only your origin elsewhere.
- Avoid surprises from browser default changes by setting the policy yourself.
- Ship faster with ready snippets for every popular server stack.
Common Use Cases
- β’Hardening a production website before a security review or launch.
- β’Fixing a failing Referrer-Policy check on securityheaders.com or Observatory.
- β’Deciding between same-origin and strict-origin policies for a privacy-sensitive product.
- β’Adding the meta tag variant when you cannot modify server configuration.
- β’Teaching teams how the Referer header behaves across origins and protocols.
Set a Referrer-Policy Header
- Pick a directive: Click one of the eight radio cards β strict-origin-when-cross-origin is preselected and marked recommended, while unsafe-url carries a warning badge.
- Compare behavior: The matrix shows exactly what the browser sends for same-origin requests, cross-origin requests, and HTTPS-to-HTTP downgrades: nothing, origin only, or the full URL.
- Choose your deployment target: Scroll through the generated header line, the meta referrer tag, and the nginx, Apache, and Express snippets β all update live to your selected directive.
- Copy and ship: Press the Copy button next to the snippet for your stack, add it to your server config or page head, and use Reset to return to the default recommendation.
Key Features
- All 8 W3C Referrer-Policy directives explained with plain-language privacy hints.
- Per-scenario leak matrix showing exactly what is sent same-origin, cross-origin, and on HTTPS downgrades.
- Recommended and leak-risk badges so safe and unsafe choices are obvious at a glance.
- Copy-paste output for the HTTP header, nginx, Apache, Express middleware, and the HTML meta tag.
- Fully bilingual EN/TH interface and 100% offline β nothing leaves your browser.