Opens in a new tab

Referrer-Policy: how much of your address other sites see

When a visitor follows a link or a page loads something from another site, the browser tells that site where the visitor came from in the Referer header. Referrer-Policy decides how much it says: the full address, only the site, or nothing. Browsers now default to a sensible middle, but setting it yourself makes it certain.

Defined inW3C Referrer Policy
Browser defaultstrict-origin-when-cross-origin (Chrome 85, Firefox 87, Safari 15)
OWASP recommendsstrict-origin-when-cross-origin
FallbacksA comma-separated list; the last value the browser knows wins

Check Referrer-Policy on your site

Enter a domain: we fetch its homepage and read every security header, this one first.

What it does

A page address can carry private details — a search, an order number, a reset token in a query string. Without a policy, older browsers sent the whole address to every site a page linked to or loaded from, including analytics and ad scripts.

Since 2020–2021 browsers default to strict-origin-when-cross-origin: the full address stays within your site, other sites get only your domain, and nothing is sent when going from HTTPS to HTTP. Sending the header yourself makes that certain for older browsers too — or lets you choose to send less.

Directives and values

Directive or valueWhat it does
no-referrerNever send the Referer.
same-originFull address within your site; nothing to other sites.
strict-originOnly your origin, and nothing on HTTPS → HTTP.
strict-origin-when-cross-originFull address within your site; only the origin to other sites; nothing on HTTPS → HTTP. The default.
origin / origin-when-cross-originThe origin (or the full address within your site), even on a downgrade to HTTP.
no-referrer-when-downgradeThe full address everywhere except HTTPS → HTTP — the old default.
unsafe-urlThe full address to everyone, always. Leaks private details; avoid.

What to send

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

Use no-referrer or same-origin for sites that should tell other sites nothing, such as a webmail or a patient portal. Values are never quoted.

How to set it

Apache

Header always set Referrer-Policy "strict-origin-when-cross-origin"

In the virtual host or .htaccess; needs mod_headers (and AllowOverride FileInfo for .htaccess). always also covers error pages and redirects, which plain Header set skips.

nginx

add_header Referrer-Policy "strict-origin-when-cross-origin" always;

In the server block. A location with any add_header of its own drops every add_header from the server block — repeat them there, or from nginx 1.29.3 use add_header_inherit merge;.

IIS (web.config)

<system.webServer>
  <httpProtocol>
    <customHeaders>
      <add name="Referrer-Policy" value="strict-origin-when-cross-origin" />
    </customHeaders>
  </httpProtocol>
</system.webServer>

Caddy

header Referrer-Policy "strict-origin-when-cross-origin"

Cloudflare

Rules → Overview → Create rule → Response Header Transform Rule
Set static — header name: Referrer-Policy — value: strict-origin-when-cross-origin

On every plan, for records that are proxied through Cloudflare. Set replaces the header if your server already sends one.

WordPress

add_action( 'send_headers', function () {
	header( 'Referrer-Policy: strict-origin-when-cross-origin' );
} );

In a small plugin or the theme’s functions.php. PHP only runs for pages WordPress builds, so images, scripts and other static files do not get the header — set it at the server or CDN to cover everything.

Common mistakes

  • unsafe-url, origin or origin-when-cross-origin, which can leak addresses over insecure connections.
  • Quoting the value.
  • Expecting a comma-separated fallback list to work in a link’s referrerpolicy attribute — it works only in the header.
  • Mixing up spellings: the link relation is noreferrer, the policy value is no-referrer.

What we recommend

Send strict-origin-when-cross-origin, or no-referrer if the site should never tell other sites where visitors came from. If you use Cloudflare’s “Add security headers” managed transform, it sends same-origin — stricter, and also fine.

Questions

Why do I need it if browsers already default to strict-origin-when-cross-origin?

For browsers older than Chrome 85, Firefox 87 or Safari 15, which still send the full address, and to choose something stricter than the default where it matters.

Sources

Checked on 25 September 2026 against these official sources:

Know when a header disappears

Add your domain and we scan it on a schedule — security headers, certificate, HTTPS, DNS and email — and email you when a security header is removed, a certificate changes or HTTPS stops redirecting. Free for your first domain.

Create a free account