Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Missing Referrer-Policy header: stop URLs leaking personal data

OPS-173Medium impactDetectedBy FunnelGuardPublished Updated
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.

How a URL with an email leaks
  1. Form submittedRedirects to /thank-you?email=jane@example.com
  2. Thank-you page loadsPage loads pixels, widgets and embeds
  3. No Referrer-PolicyBrowser may send the full URL
  4. 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

Check the header and your URLs
  1. 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.

  2. Or use curl

    Run curl -sI https://example.com | grep -i referrer-policy. No output means the header is missing.

  3. 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.

  4. 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.

Common Referrer-Policy values
ValueWhat other sites receiveGood for
no-referrerNothingMaximum privacy
strict-origin-when-cross-originOnly your domainMost marketing sites
same-originNothing to other sitesInternal tools
unsafe-urlFull URL alwaysAvoid
Set the header on your platform
  1. 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'); });

  2. Or use the server

    On Apache add the .htaccess rule below. Some security plugins also have a headers setting, if yours does.

nginxnginx
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Apache (.htaccess, needs mod_headers)htaccess
<IfModule mod_headers.c>
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>
Then clean up your URLs
  1. 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.

  2. 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.

  3. 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

Confirm
  • The referrer-policy header (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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: site safety (Stage 26, daily): Referrer-Policy; no_pii_in_tracking for hits.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.