HTTP Security Headers Checker
What each header does, what yours actually says, and the line to add. No letter grade.
Where to start, if you are starting
The headers are not equally valuable and they are not equally risky to deploy. In the order that gives the most protection for the least chance of breaking something:
| Header | Stops | Risk of breaking things |
|---|---|---|
Strict-Transport-Security | First-visit HTTPS downgrade | None, if you are already HTTPS-only |
X-Content-Type-Options | MIME sniffing of uploads | None in practice |
Referrer-Policy | Leaking URLs to third parties | Low — may affect analytics attribution |
X-Frame-Options / frame-ancestors | Clickjacking | Low, unless something legitimately embeds you |
Permissions-Policy | Embedded frames requesting camera or location | Low |
Content-Security-Policy | Injected script executing | High. Use report-only first. |
The last row is the one that matters most and the one that takes actual work. Everything above it is an afternoon.
HSTS, and the one irreversible decision in it
Strict-Transport-Security tells a browser to use HTTPS for this host for the next max-age seconds, no matter what. It closes a narrow but real gap: a visitor typing example.com makes one plaintext request before your redirect, and that request can be intercepted.
Strict-Transport-Security: max-age=31536000; includeSubDomainsincludeSubDomains matters more than it looks. Without it, a subdomain served over HTTP can still set cookies for the parent domain. With it, every subdomain must be HTTPS-only or it becomes unreachable — so check before adding it.
The preload directive is the decision to think hard about. It gets your domain baked into browsers’ shipped preload lists, so HTTPS is enforced before the first request ever happens. It is also effectively irreversible: removal requires a request to the list maintainers and then waiting for browser releases to roll out, which is months. Excellent once you are certain; a bad thing to add casually.
CSP: report-only is not optional
A Content-Security-Policy is the only header here that stops injected script from running, and it is the only one that can take your site down. Both facts follow from the same property: it restricts what may load.
Deploy it in report-only mode with a collector and leave it for a few weeks of real traffic. What you will find is not what you expected from reading the code — there will be a font host you forgot, a payment iframe, and frequently a script injected at the CDN edge that appears in no source file anywhere. That last category is precisely what report-only exists to surface.
Content-Security-Policy-Report-Only: default-src 'self';
script-src 'self'; object-src 'none'; base-uri 'self';
report-uri /csp-reportTwo things that undo most of the benefit. 'unsafe-inline' in script-src permits exactly the injected inline script the policy exists to stop — nonces or hashes are the way out. And 'unsafe-eval' re-enables eval and its relatives, which some older framework builds still need. The checker flags both as weakening rather than as absent, because a policy with them is still doing useful work; it is just not doing the main job.
Headers whose advice has expired
X-XSS-Protection— controlled a browser filter that has been removed from every major browser, and which in its day could itself be manipulated to break pages. It is not a header to set in 2026.Expect-CT— obsolete. Certificate Transparency is now enforced unconditionally, so the header does nothing.Feature-Policy— renamed toPermissions-Policy, with different syntax. Only the new name is honoured.Public-Key-Pins— removed from browsers, and rightly. A mistake in it bricked your domain for the pin lifetime with no way to recover.
What this does not check
One page, one response. It reads the headers on the final response after following redirects, and stops there. It does not crawl the site, evaluate JavaScript, test your TLS configuration or check cookie flags — and different paths on the same site can send entirely different headers, so checking the homepage tells you about the homepage.
For TLS configuration specifically, Qualys SSL Labs is the established tool and is thorough. For the certificate itself, this one reads what a host actually presents.
Header questions
Why is there no score or grade?
Because a grade is the one output nobody can act on. Knowing you have a C tells you nothing about which header is missing, why it matters for your site, or what to set — and it encourages adding headers to move a letter rather than to solve a problem. A site with a strict CSP and no Permissions-Policy is in far better shape than one with six headers set to permissive values, and no single letter can express that. So this reports each header separately, judges the value you actually send, and gives you the line to add.
Which header should I add first?
Strict-Transport-Security, if you are already HTTPS-only. It is one line, it cannot break anything that was working, and it closes the first-visit downgrade window. Then Content-Security-Policy in report-only mode — that is the one with real teeth, and report-only lets you discover what your site actually loads before you enforce anything. X-Content-Type-Options: nosniff is also free and should just be on.
Will a Content-Security-Policy break my site?
It can, easily, which is why report-only mode exists. Deploy Content-Security-Policy-Report-Only with a collector, leave it for a couple of weeks of real traffic, and read what it reports — you will find resources you had forgotten about, and frequently things injected at the edge by a CDN or analytics provider that appear in no source file. Only enforce once the reports are quiet. Enforcing a policy written from a reading of the codebase is how checkout goes down.
Is X-XSS-Protection worth setting?
No. It controlled a browser XSS filter that has been removed from every major browser — Chrome dropped it in 2019 — and in its day the filter itself introduced vulnerabilities, because it could be manipulated into breaking pages that were not vulnerable. Setting it to 0 is defensible if some scanner insists; setting it to 1; mode=block is repeating advice that expired years ago. Content-Security-Policy is the replacement.
Do I still need X-Frame-Options if I have CSP?
No, provided your CSP sets frame-ancestors, which supersedes it in every current browser. This checker recognises that and does not report X-Frame-Options as missing when frame-ancestors is doing the job. Keeping both costs nothing and helps only with browsers old enough that you probably have larger problems.
Does a missing header mean I am vulnerable?
No. Security headers are defence in depth — they limit the damage of a vulnerability, they do not create or remove one. A site with no CSP is not vulnerable to XSS; a site with an XSS bug is, and the CSP is what stops that bug becoming a full compromise. Adding headers is worthwhile and cheap, and it is not a substitute for output encoding, input validation and keeping dependencies current.
Last reviewed . Found something out of date? Tell us.
