HTTP Headers Reference: Every Header That Matters

August 26, 2026 · 7 min read

Every time a browser loads a page, the server sends back a set of HTTP response headers before any HTML arrives. They control caching, security, redirects and how search engines treat your page — yet most sites get several of them wrong.

This is a practical reference: what each header does, when it matters, and a common mistake to avoid. At the end you can check any URL with our free URL Inspector, which shows all response headers plus an analysis of the security ones.

Check your headers now: paste any URL into the free URL Inspector. You'll see every response header, a pass/warn/fail analysis of the security headers, the full redirect chain, and the SSL certificate — no signup.

Security headers

HeaderWhat it doesCommon mistake
Strict-Transport-SecurityTells browsers to only ever reach the site over HTTPS, even if a user types http://. The max-age should be at least 31536000 (one year).Sending it on an HTTP response (browsers ignore it there). Also forgetting includeSubDomains, leaving subdomains unprotected.
Content-Security-PolicyWhitelists where scripts, styles, frames and other resources may load from. The single most effective defence against XSS.Using unsafe-inline everywhere "to make it work", which removes most of the protection.
X-Content-Type-OptionsSet to nosniff: stops browsers from guessing file types, which can turn an uploaded file into executable script.Setting it on HTML pages only — it matters most for user-uploaded files and APIs.
X-Frame-OptionsDENY or SAMEORIGIN: stops other sites from embedding your page in an iframe (clickjacking).Relying on it alone — CSP's frame-ancestors directive is stronger and replaces it in modern browsers.
Referrer-PolicyControls how much referrer data leaves your site when users click outbound links. strict-origin-when-cross-origin is today's sensible default.Leaving it unset: full URLs (including query strings with personal data) leak to every linked site.
Permissions-PolicyDenies or allows browser features like camera, microphone and geolocation, including inside embedded iframes.Omitting it entirely — then any third-party script can request powerful APIs.

Caching headers

HeaderWhat it doesCommon mistake
Cache-ControlThe modern way to control caching. Static assets: public, max-age=31536000, immutable. HTML: no-cache so updates show up immediately.Long cache on HTML — visitors see stale pages after you deploy.
ETagA fingerprint of the response. On the next request the browser sends it back and gets a tiny 304 Not Modified instead of the whole page.None usually — but weak ETags on cluster setups can cause needless re-downloads.
ExpiresLegacy predecessor of Cache-Control. Ignored when both are present.Setting Expires and believing it overrides Cache-Control — it doesn't.
VaryTells caches which request headers change the response, e.g. Vary: Accept-Encoding.Vary: User-Agent — it fragments the cache into hundreds of near-empty entries.

SEO-relevant headers

HeaderWhat it doesCommon mistake
Link: rel=canonicalHTTP-header version of the canonical tag — useful when the same file is served at multiple URLs and you can't change its HTML.Conflicting canonicals: header says A, meta tag says B. Google picks one, not necessarily yours.
X-Robots-TagRobots directives for non-HTML files: X-Robots-Tag: noindex keeps a PDF out of search results.Trying to noindex a URL that also returns 404/redirects — the signal never gets read reliably.
Location (3xx responses)The destination of a redirect. The status code matters too: 301 passes SEO value, 302 mostly doesn't.Chains of 3+ hops instead of pointing directly at the final URL. See our guide to checking redirect chains.
Retry-AfterWith 503: tells crawlers to come back later without treating pages as gone.Returning 503 during maintenance without it, so Google starts dropping pages.

Other headers worth knowing

A minimal, sane set for most sites

Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Content-Security-Policy: frame-ancestors 'self'
Cache-Control: no-cache          # HTML
Cache-Control: public, max-age=31536000, immutable   # hashed static assets

Check any URL in seconds

The free URL Inspector fetches the URL, follows every redirect, lists all response headers of the final response, grades the security headers pass/warn/fail, and shows the SSL certificate — including issuer, expiry countdown and chain trust. Nothing is stored and there's no account.

Related: How to check a URL redirect chain · Security headers checker · Page Profile CLI — check headers, meta tags & schema from the terminal · All free tools

Keeping websites online? DeskUptime is a free desktop uptime & SSL-expiry monitor for macOS, Linux and Windows.