On this page
What this issue is
When a visitor clicks a link or your page loads a script, image or pixel from another domain, the browser can send a Referer header (the spelling is historic) with the address of the page they came from. The Referrer-Policy response header tells the browser how much of that address to share.
If you do not set it, the browser uses its own default. Modern browsers default to strict-origin-when-cross-origin, which trims the path and query for other sites. But older browsers, embedded browsers and some setups still send more. Also, same-site requests and some tools still receive the full URL. Setting the header makes the behaviour the same for everyone.
The real danger is personal data in URLs, such as /thank-you?email=jane@example.com or /checkout?order=1042&name=Jane. That data can reach ad platforms, analytics tools, chat widgets and embedded content, and it is also stored in their logs.
Why it costs you leads or sales
Leaked personal data is a privacy and compliance risk under rules such as GDPR. It can also lead to ad platform warnings, because platforms such as Google and Meta do not allow personal data to be passed to them in URLs or event parameters. Visitors who learn their email was shared may stop trusting you and abandon forms.
- Form submittedRedirects to /thank-you?email=jane@example.com
- Thank-you page loadsPage loads pixels, widgets and embeds
- No Referrer-PolicyBrowser may send the full URL
- Third-party logsEmail stored by outside tools
The full URL travels with each third-party request when no policy limits it.
How to check if your site has it
Inspect response headers
Open your site in Chrome, press F12, go to the Network tab, reload and click the first document request. Look under Response Headers for
referrer-policy.Or use curl
Run
curl -sI https://example.com | grep -i referrer-policy. No output means the header is missing.Look for personal data in URLs
Submit a test form and walk through checkout. Watch the address bar for emails, names, phone numbers or order details in the query string.
Check outgoing requests
In the Network tab, click requests to other domains (pixels, analytics) and check whether the Referer header or request URL contains personal data.
How to fix it
Use strict-origin-when-cross-origin for most sites. It sends the full URL within your own site, only the domain to other sites, and nothing when moving from HTTPS to HTTP. Use no-referrer if you want to share nothing, but it can break referral reports in some partner tools.
| Value | What other sites receive | Good for |
|---|---|---|
| no-referrer | Nothing | Maximum privacy |
| strict-origin-when-cross-origin | Only your domain | Most marketing sites |
| same-origin | Nothing to other sites | Internal tools |
| unsafe-url | Full URL always | Avoid |
Add the header in code
In a child theme or small plugin, add:
add_action('send_headers', function(){ header('Referrer-Policy: strict-origin-when-cross-origin'); });Or use the server
On Apache add the .htaccess rule below. Some security plugins also have a headers setting, if yours does.
Know the limit
Shopify does not let you set custom response headers on storefront pages. A meta tag in theme.liquid is the available option.
Add a meta tag
In Online Store > Themes > Edit code > theme.liquid, add
<meta name="referrer" content="strict-origin-when-cross-origin">inside <head>.
GTM cannot set headers
Headers come from the server. Use GTM only to stop tags sending personal data, for example by checking Page URL variables and removing email parameters.
Add a meta tag
Go to Site settings > Custom code > Head code and add
<meta name="referrer" content="strict-origin-when-cross-origin">, then publish.Optional proxy headers
If the site sits behind Cloudflare or another proxy, you can add the real header there.
Add a meta tag
In the funnel or website Settings, add the meta tag to the Head tracking code. Custom response headers are not available unless you proxy the domain.
Use Custom code
Wix manages headers for you. You can add the meta tag through Settings > Custom code in the head, though Wix may restrict some behaviour.
Add a meta tag
Go to Settings > Advanced > Code Injection, paste the meta tag in the Header box and save.
Set it on the server
Use the nginx or Apache snippets below, then reload the server.
add_header Referrer-Policy "strict-origin-when-cross-origin" always;<IfModule mod_headers.c>
Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>Stop passing personal data in query strings
Change forms to submit with POST and redirect to a plain thank-you URL such as /thank-you with no parameters.
Use IDs, not details
If a page needs to show a name or order, look it up on the server from a session or an opaque ID.
Review tags
Check that tracking tags do not send the full URL with personal data as a parameter. Strip or redact those values.
How to confirm it's fixed
- The
referrer-policyheader (or meta tag) appears on key pages - Thank-you and checkout URLs contain no email, name or phone number
- Requests to third-party domains show no personal data in the Referer or URL
- Pages still work and your analytics still record sessions
How to prevent it happening again
Add the header to your base server or proxy config so every new page gets it. When building new forms and funnels, make a rule that personal data never goes in a URL. Review your headers after theme changes, migrations or CDN changes, since they can silently drop custom headers.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its no_pii_in_tracking check looks at the tracking hits your funnel sends to ad and analytics platforms during a test journey, and flags personal data that appears in them. That catches the most damaging effect of leaky URLs.
It does not check whether your site sends a Referrer-Policy header, and it does not inspect every third-party request such as chat widgets or embeds. Cover the rest by hand: run the curl command above, review response headers after each release, and walk your forms and checkout looking for personal data in the address bar.
FunnelGuard has a Free plan (1 site, 2 journeys, daily checks, no card), and paid plans start at $39/month with a 3-day free trial.
Questions people ask
What is a Referrer-Policy header?
It is an HTTP response header that tells browsers how much of the current page URL to share with other sites when a link is clicked or a resource loads. Values range from no-referrer (share nothing) to unsafe-url (share everything).
What should I set my Referrer-Policy to?
For most marketing sites, strict-origin-when-cross-origin is the best balance. Other sites only see your domain, and your own pages still get full referrer data for analytics. Use no-referrer if you want to share nothing.
Why is my email address showing up in third-party tools?
Usually because it is in the page URL, for example a thank-you page with ?email= in it. Tags or the browser's Referer header pass that URL to other tools. Remove personal data from URLs and set a Referrer-Policy.
Does a missing Referrer-Policy break GDPR compliance?
It is not a violation by itself, but it can let personal data reach third parties without a legal basis. That may become a compliance problem. Ask your legal adviser about your specific case.
How do I add a Referrer-Policy on Shopify or Wix?
You usually cannot set response headers on these platforms. Add a <meta name="referrer" content="strict-origin-when-cross-origin"> tag in the head through theme code or custom code settings instead.
Will Referrer-Policy hurt my analytics?
Not with strict-origin-when-cross-origin. Your own site still sees full URLs, and other sites see your domain. You might lose path-level referral details in partner tools.
Does FunnelGuard check for a missing Referrer-Policy?
Only partly. It checks that tracking hits sent during a test journey contain no personal data, but it does not check the header itself. Verify the header manually with browser dev tools or curl.
Related issues
- OPS-170Missing Content-Security-PolicyFix guide
- OPS-171Missing X-Frame-Options / frame-ancestors (clickjacking)Fix guide
- OPS-172Missing X-Content-Type-OptionsFix guide
- OPS-174Missing Permissions-PolicyFix guide
- OPS-175Cookies without Secure/HttpOnly/SameSiteFix guide
- OPS-176Open redirect on site (abused for phishing, ad disapproval)Fix guide