Blog

Website security headers checklist for 2026

Most sites leak a handful of free security wins because nobody ever set the right response headers. Here is the checklist, in the order it matters.

· Published

Why a header is a security control

Modern browsers ship with defenses against hijacked scripts, clickjacking, and downgraded connections, but most of them are opt-in: the browser only enforces them when your server explicitly asks for it in a response header. Skip the header, and the browser falls back to its most permissive behaviour.

That makes a security-header audit one of the highest-value, lowest-effort checks you can run on a website. None of it requires a web application firewall, a CDN, or a security budget. It is a handful of lines in your server or CMS configuration, and most of them take less than five minutes to add.

The scope. This checklist covers HTTP response headers and cookie flags, the controls a browser can enforce on every page load. It does not replace a full penetration test, but it closes the gaps that show up in every automated scanner and every "why did this get flagged" conversation with a client.

The checklist

CheckWhat it doesExample value
HTTPS + redirectEvery plain http:// request must 301-redirect to https://; nothing should ever load over plain HTTPn/a (server config)
Strict-Transport-SecurityTells the browser to never try http:// for this domain again, even if a link points theremax-age=31536000; includeSubDomains
Content-Security-PolicyRestricts which domains scripts, styles, and frames may load from, the main defense against injected or hijacked third-party scriptsdefault-src 'self'; script-src 'self' https://trusted-cdn.example
X-Content-Type-OptionsStops the browser from guessing a file’s MIME type, closing a path to serving malicious content as something elsenosniff
X-Frame-Options / frame-ancestorsBlocks your pages from being embedded in another site’s invisible iframe (clickjacking)DENY or CSP frame-ancestors 'none'
Referrer-PolicyControls how much of your URL leaks to the next site when a visitor clicks a linkstrict-origin-when-cross-origin
Cookie flags: Secure + SameSiteStops a cookie from ever being sent over plain HTTP, and limits it to first-party or intended cross-site requestsSet-Cookie: session=...; Secure; SameSite=Lax
Server header disclosureA version string in the Server header (e.g. Apache/2.4.41) hands an attacker a shortlist of known exploits for freestrip the version, or the header entirely
Mixed contentAn HTTPS page that still loads one http:// image, script, or stylesheet breaks the padlock guarantee for the whole pagerewrite every asset URL to https://

How to check your own site

You do not need an account anywhere to run the first pass:

  • Browser DevTools. Open the Network tab, reload the page, click the main document request, and read the Response Headers panel.
  • curl. curl -sI https://example.com prints every response header without loading a single byte of page content.
  • Automated scanners. Free online header checkers exist, but most only run once, on the homepage, on demand. A header that passes today can silently break after a CMS update, a new plugin, or a CDN config change, and nothing tells you until a client (or a pentest) notices.

That gap, a one-off check versus a monitored one, is the difference between finding an issue in a report and finding it in an incident.

What this looks like automated

MetriXs runs this exact checklist as the Security tab (Team and Pro plans): HTTPS and redirect behaviour, HSTS, CSP, the clickjacking and MIME-sniffing headers, Referrer-Policy, cookie flags, server disclosure, and mixed content, scanned deterministically with plain HTTP requests and rule checks, no AI involved, no credentials needed. A re-run is throttled to once an hour and the last 12 runs are kept, so a regression after a deploy shows up as a trend, not a surprise six months later.

It is the same checklist as above, just checked automatically on the schedule you already have an analytics dashboard open for.

Frequently asked questions

What is HSTS and why does it matter?
HTTP Strict Transport Security tells the browser to never attempt a plain http:// connection to your domain again, for a set period. Without it, a visitor who types your domain without "https://" or clicks an old http:// link gets one unencrypted request before any redirect can kick in, a window an attacker on the same network can exploit.
Do I need a Content-Security-Policy if I do not run a web application firewall?
Yes. A CSP is a browser-side control, not a server-side one; it works with no WAF, no CDN, and no extra infrastructure. Even a basic policy that only whitelists your own domain and the third-party scripts you actually use blocks most injected-script attacks.
What is the difference between X-Frame-Options and CSP frame-ancestors?
Both stop your page from being embedded in another site’s iframe (clickjacking). X-Frame-Options is the older, simpler header; frame-ancestors is the newer CSP directive and supports more flexible rules. Browsers that understand both will use frame-ancestors; sending either one is enough to pass the check.
How often should I recheck my security headers?
After every deploy that touches server config, your CDN, or a CMS/plugin update, since any of those can silently strip a header. Beyond that, a weekly automated check catches regressions long before an annual pentest would.

Check it once, then let it watch itself

The MetriXs Security tab runs this checklist on your site automatically, Team and Pro plans. Free plan available, paid from €6/month.

Start free trial →

Related: MetriXs and security · Cookieless tracking explained · GDPR-compliant analytics · GDPR-compliant analytics checklist