Referer Header Explained

What the HTTP Referer header does and when it's used.

Published October 14, 2026

Referer (sic) tells the server the URL of the page that linked to the current request. It is used for analytics and some CSRF checks.

How it works

Browsers may trim it for privacy according to the Referrer-Policy.

The Referer header is part of the HTTP message and is case-insensitive in name.

In a real exchange

curl -i https://example.com/
Referer: https://example.com/products
Where Referer appears.

Practical examples

The header

Referer: https://example.com/products

Set or use it in code

<meta name="referrer" content="strict-origin-when-cross-origin">

Inspect it

curl -sI https://example.com | grep -i 'referer'

Common mistakes

  • Relying on it as authentication
  • Leaking sensitive URLs in the Referer
  • Misspelling it as Referrer in the header name

Key takeaways

  • Referer: Referer (sic) tells the server the URL of the page that linked to the current request.
  • Check it in browser DevTools → Network.
  • Test with curl -I before deploying.

FAQ

Why the odd spelling?

An original spelling mistake in the HTTP spec that stuck.

Is Referer case sensitive?

Header names are case-insensitive; values may not be.

More HTTP articles