Skip to the content
Start free

The Referrer-Policy is missing or leaks addresses

There is no Referrer-Policy, or one that sends full page addresses to other sites, possibly with private details in them.

Low priority Security and HTTPS

Why it matters #

When a visitor follows a link, or a page loads a file from another site, the browser can tell that site which page they came from. With unsafe-url or no-referrer-when-downgrade, the full address goes along, including anything after the domain, such as search words or order numbers.

Current browsers default to strict-origin-when-cross-origin, which is a sound choice, but older browsers sent full addresses. A value browsers do not know is ignored.

How to fix it #

Send "Referrer-Policy: strict-origin-when-cross-origin". It keeps full addresses inside your own site, sends only your domain to others, and sends nothing from https to http.

Check the spelling, because browsers ignore a value they do not recognise. Check with the Security Headers Checker.

What it looks like, and fixed #

The problem
Referrer-Policy: unsafe-url

Sends the full address of every page, including anything after the domain, to every other site.

Fixed
Referrer-Policy: strict-origin-when-cross-origin

Full addresses stay inside your site, other sites see only your domain, and nothing goes from https to http.

Fix it with your AI assistant #

Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.

Your instruction for the AI
Help me set a safe Referrer-Policy on [your website address], which runs on [your platform or server, e.g. Shopify, or WordPress on nginx]. A checker says the policy is missing, misspelt, or sends full page addresses to other sites. First check: run "curl -sI https://[your domain]/" (or ask me to paste the headers) and read the page source for meta referrer tags and referrerpolicy attributes. Tell me which pages could carry private details in their addresses, such as search words, order numbers or email addresses. Explain plainly what is sent today. Then give me the exact change: "Referrer-Policy: strict-origin-when-cross-origin", set in one place, spelt exactly. Rules: back up first, keep all other headers, remove only conflicting looser values, and if a partner needs to know which page a visitor came from, suggest a tracking parameter in that link instead. Give the exact line and where it goes. Finally, tell me to re-check with the URSY.com Security Headers Checker at ursy.com/security-headers-checker/.

We find the problems, and help you fix them

  1. Check Run a free tool or the full audit.
  2. Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
  3. Re-check Come back, check again, and watch each fix turn green.

How the AI Fix Pack works, with a sample to download

Fix it on your platform #

WordPress

Many security plugins have a Referrer-Policy setting. Check that a plugin or theme is not adding a looser one.

A hand-made site

If you cannot set headers, <meta name="referrer" content="strict-origin-when-cross-origin"> in the head of each page does the same job.

Your server or hosting

On nginx add add_header Referrer-Policy "strict-origin-when-cross-origin" always; and on Apache Header always set Referrer-Policy "strict-origin-when-cross-origin".

Check it is fixed #

Run the Security Headers Checker again: it should find Referrer-Policy set to strict-origin-when-cross-origin, or another value that does not leak full addresses.

Official source #

MDN: Referrer-Policy

Questions #

Will partners still see where visitors came from?

They will see your domain, not the full page address. If a partner needs the exact page, add it to the link as a parameter.

Does it change my own analytics?

Visits between your own pages keep the full address. What you see about visitors from other sites depends on their policy, not yours.

More problems in Security and HTTPS

See every problem in the library

For AI assistants and developers: Instructions for AI · Developers · How to cite URSY.com