Referrer-Policy explainer
Pick a Referrer-Policy and see the exact Referer header sent for same-origin, cross-origin and HTTPS to HTTP requests. All eight policies in one table.
Used to show the exact Referer header. It stays in your browser.
What strict-origin-when-cross-origin sends
- Same origin
- https://example.com/account/reset?token=abc123
- Another site, HTTPS to HTTPS
- https://example.com/
- Downgrade, HTTPS to HTTP
- No Referer header
Referrer-Policy: strict-origin-when-cross-origin
All eight policies
| Policy | Same origin | Another site, HTTPS to HTTPS | Downgrade, HTTPS to HTTP |
|---|---|---|---|
| no-referrer | Nothing | Nothing | Nothing |
| no-referrer-when-downgrade | Full URL | Full URL | Nothing |
| origin | Origin only | Origin only | Origin only |
| origin-when-cross-origin | Full URL | Origin only | Origin only |
| same-origin | Full URL | Nothing | Nothing |
| strict-origin | Origin only | Origin only | Nothing |
| strict-origin-when-cross-origin | Full URL | Origin only | Nothing |
| unsafe-url | Full URL | Full URL | Full URL |
The full URL is the address without its fragment (the part after #) and without any user name or password. Origin only is the scheme, host and port, such as https://example.com/.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the Referrer-Policy explainer
- Choose a policy from the list.
- Enter the address of a page on your site, or keep the example.
- Read what is sent in each of the three cases.
- Compare with the table of all eight policies and copy the header.
About this tool
When a visitor follows a link or a page loads an image or script, the browser tells the destination where the request came from in the Referer header. The Referrer-Policy header controls how much it says: the full URL, only the origin, or nothing. It matters because URLs carry more than people expect, such as search terms, account IDs and password-reset tokens.
Each of the eight policies answers three questions: what is sent to the same origin, what is sent to another site over HTTPS, and what is sent when the request goes from HTTPS down to plain HTTP. The table shows all of them side by side, and the example uses a page address you enter, so you can see the exact header.
Browsers default to strict-origin-when-cross-origin when no policy is set: the full URL within your own site, the origin only to other sites, and nothing on a downgrade. That is a good choice for most sites. The values to avoid are unsafe-url and no-referrer-when-downgrade, which hand full URLs to third parties. Even with a strict policy, keep secrets out of URLs.
Sources
Questions
strict-origin-when-cross-origin suits most sites and is the browser default. Use same-origin or no-referrer when other sites should learn nothing, for example on pages with sensitive paths. Setting the header explicitly makes older browsers behave the same way.
Current versions of Chrome, Firefox, Edge and Safari use strict-origin-when-cross-origin when a page sets no policy. Older browsers used no-referrer-when-downgrade, which sends full URLs to other HTTPS sites.
Both send only the scheme, host and port. origin sends it on every request, including from an HTTPS page to a plain HTTP destination. strict-origin sends nothing on such a downgrade, so the origin does not travel unencrypted.
The request header Referer was misspelled in the original HTTP specification and the spelling stuck. The newer Referrer-Policy header uses the correct spelling. Both spellings are right for their own header.