What Are HTTP Headers?

HTTP headers are key-value pairs sent at the beginning of every HTTP request and response. They carry metadata about the connection, the content, caching behavior, security policies, and authentication - All invisible to normal users but critical to how the web works. Inspect the headers any website sends to your browser with our HTTP headers checker.

Common Request Headers

HeaderPurposeExample Value
HostSpecifies the domain being requested (required in HTTP/1.1)Host: example.com
User-AgentIdentifies the browser, OS, and versionMozilla/5.0 (Windows NT 10.0; Win64; x64)...
AcceptContent types the client can handletext/html, application/json
Accept-LanguagePreferred language for the responseen-US,en;q=0.9
RefererURL of the page that linked to this resourcehttps://google.com/search?q=...
CookieSends stored cookies to the serversession_id=abc123; theme=dark
AuthorizationSends credentials for HTTP authenticationBearer eyJhbGci...
X-Forwarded-ForPasses client IP through proxies and load balancers203.0.113.5, 10.0.0.1

Important Security Response Headers

HeaderPurposeRecommended Value
Strict-Transport-SecurityForces HTTPS for future visits (HSTS)max-age=31536000; includeSubDomains
Content-Security-PolicyControls which resources the browser may load (blocks XSS)default-src 'self'; script-src 'self'
X-Content-Type-OptionsPrevents MIME-type sniffingnosniff
X-Frame-OptionsPrevents clickjacking via iframesDENY or SAMEORIGIN
Referrer-PolicyControls how much referrer info is sentstrict-origin-when-cross-origin
Permissions-PolicyControls access to browser APIs (camera, microphone, etc.)geolocation=(), camera=()

How Headers Relate to Privacy

  • The User-Agent header reveals your browser, OS version, and architecture - A significant fingerprinting signal.
  • The Referer header can leak sensitive URLs (including search queries or internal paths) to third-party resources.
  • X-Forwarded-For headers added by proxies and VPNs can reveal your original IP to the destination server if the proxy is misconfigured - Run our VPN leak test to verify yours doesn't.
  • The Accept-Language header reveals your preferred language - A small but contributing fingerprinting attribute.

How to View HTTP Headers Yourself

StepAction
1Run any domain through the HTTP headers checker to see exactly what its server sends, including which security headers are missing
2In your browser, press F12 (or Cmd+Option+I on Mac) to open DevTools, select the Network tab, and reload the page
3Click the first request in the list - The Headers panel shows request headers (what your browser revealed) and response headers (what the server replied)
4From a terminal, curl -I https://example.com prints response headers only; add -v to see both directions of the exchange

HTTP/2 and HTTP/3 changed the format, not the idea

In modern HTTP versions, headers are binary-compressed (HPACK/QPACK) rather than sent as readable text lines, and the old request line became pseudo-headers like :method, :path and :authority. DevTools displays them in the familiar key-value form regardless, so everything in this article applies unchanged - The names are case-insensitive by specification, which is why you'll see content-type and Content-Type used interchangeably.

Caching and Content Negotiation Headers

Beyond security and identity, headers run the web's performance machinery:

HeaderPurposeExample Value
Cache-ControlHow long browsers and CDNs may reuse the responsemax-age=3600, public
ETagVersion fingerprint - Lets the browser ask "has this changed?""33a64df5"
Content-TypeDeclares the media type of the bodytext/html; charset=utf-8
Content-EncodingCompression applied to the bodygzip, br (Brotli)
VaryWhich request headers change the response (cache correctness)Accept-Encoding, Accept-Language
LocationWhere a 301/302 redirect pointshttps://www.example.com/

Headers that carry your IP

When traffic passes through proxies, load balancers, or CDNs, the original client IP would be lost - So intermediaries append it to X-Forwarded-For, the standardised Forwarded header (RFC 7239), or vendor headers like CF-Connecting-IP. This is how a site behind Cloudflare still knows your public IP - And how a misconfigured anonymising proxy can leak the address it was supposed to hide.

What This Means for You

Headers are where your browser quietly negotiates on your behalf, and both sides of that negotiation deserve an occasional audit. On the sending side, your User-Agent, languages, and cookies travel with every request - The raw material of fingerprinting (see the user agent FAQ for what yours says). On the receiving side, the security headers a site sends - Or fails to send - Are a fair proxy for how seriously it takes security: a banking site missing HSTS and CSP is telling you something. Five minutes with the headers checker turns that invisible layer into something you can actually read.

Frequently Asked Questions

Can websites see my IP address in the HTTP headers?

Your IP isn't in the headers you send - It comes from the TCP connection itself. Headers like X-Forwarded-For are added by intermediaries (CDNs, load balancers, proxies) so the origin server still learns the client IP after the connection has been terminated and re-opened by the middlebox.

Can I change or remove the headers my browser sends?

Some of them. Extensions and DevTools can override the User-Agent or strip the Referer, and browsers increasingly trim both by default. But headers are also a fingerprinting surface - Unusual combinations stand out - So aggressive header spoofing can make you more identifiable, not less.

Which security headers should my own website send?

The consensus baseline is Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options: nosniff, a restrictive Referrer-Policy, and X-Frame-Options (or its CSP equivalent, frame-ancestors). Run your domain through a headers checker to see which are present and copy the recommended values from there.