Security headers are short instructions a website sends with every page, telling the browser to use HTTPS, to block injected scripts, to refuse being framed by other sites and to keep cookies out of reach of scripts. A site can look perfect and still send none of them. The free Security Headers Checker scans a URL and gives it a grade from A+ to F and a score out of 100. It explains every header, breaks down the Content-Security-Policy, checks cookies, and writes the config to fix the gaps for Nginx, Apache, Cloudflare or Next.js.
This guide is for site owners and developers. It explains how to read each part and how to fix what it finds.
What Security Headers Checker does
You enter a web address. Our server requests the page using a Chrome user agent, follows redirects to the final page and reads its response headers. Those headers are audited and turned into a score, a grade, a per-header explanation and a set of copy-ready values.
It does not scan your site for vulnerabilities, and a high grade does not mean a site is safe: headers are one layer. It only sees the single page it fetched, so a header set on some pages but not others can be missed. If you only want a quick six-header summary, or the raw header list with caching and timing, the HTTP Header Checker is lighter.
How to use Security Headers Checker, step by step
- Open Security Headers Checker.
- Type a URL in the "Website URL" box.
https://is added if you leave it out. - Press Scan headers. Redirects are followed to the final page.
- Read the summary row: Security grade, Score, HTTPS, Status and Response time.
- Check Score breakdown, Header analysis and the CSP and cookie tables.
- Under Recommended headers, pick your Server platform and copy the config.
After a scan the address bar gains ?q=…, so you can bookmark or share the result. A "Try it" link checks our own site.
Reading the grade and score
The score is out of 100 and is made of nine checks:
| Check | Points |
|---|---|
| Content-Security-Policy | 25 |
| Strict-Transport-Security | 20 |
| X-Content-Type-Options | 10 |
| X-Frame-Options or frame-ancestors | 10 |
| Referrer-Policy | 10 |
| Cookie flags | 10 |
| Permissions-Policy | 5 |
| Cross-Origin-Opener-Policy | 5 |
| Server / X-Powered-By version leaks | 5 |
The letter follows the score: 95 or more is A+ (and only if no check is red), 85 or more is A, 70 B, 55 C, 40 D and anything lower F. A site that is not served over HTTPS cannot score better than C, whatever its headers say.
X-XSS-Protection is listed too, but carries no points, because it is a deprecated header.
Under the grade, a line says which address was scanned and how many redirects were followed. It also reminds you that headers set only in HTML <meta> tags are not counted. If the page returned a 400 or higher status, you are warned that error pages often lack the headers normal pages send, so scan a page that loads normally.
Score breakdown and Header analysis
The Score breakdown table shows, per check, the points earned out of the points available and a coloured result. Header analysis then explains each header in a sentence, shows the value your site sends, and, for anything that is not green, gives a one-line value you can copy.
Strict-Transport-Security (HSTS)
Tells browsers to use HTTPS only. Missing is 0 of 20. A max-age shorter than six months scores 10 and shows "Short max-age". A strong value scores 16 to 19, and a header that meets all preload requirements scores the full 20 and says "Preload-ready". The tool recommends max-age=63072000; includeSubDomains; preload.
Be careful with preload. A line under the analysis tells you whether the header is eligible, and the preload list is something you submit to at hstspreload.org once every subdomain supports HTTPS. Getting off the list again takes months.
Content-Security-Policy
The biggest single check, because it is the main defence against injected scripts. Missing scores 0 of 25. A policy sent only as Content-Security-Policy-Report-Only scores 5 and is labelled "Report-only", because nothing is blocked. An enforced policy starts from 25 and loses points for weaknesses, to a minimum of 5. The verdict reads Strong, Could be stricter or Weak.
X-Content-Type-Options, framing and referrer
X-Content-Type-Options should be nosniff. Framing protection accepts X-Frame-Options or a CSP frame-ancestors; an old ALLOW-FROM value is flagged as obsolete. Referrer-Policy scores best with values such as strict-origin-when-cross-origin, and unsafe-url scores 0.
Permissions-Policy, COOP and version leaks
Permissions-Policy limits browser features such as the camera, microphone and location. Only the old Feature-Policy header earns 2 of 5 points, with a note to rename it. Cross-Origin-Opener-Policy needs same-origin or same-origin-allow-popups.
The leak check fires when a Server header contains a number, or when X-Powered-By, X-AspNet-Version, X-AspNetMvc-Version or X-Generator is present at all. How to remove X-Powered-By on a site behind Cloudflare is covered in how to remove the X-Powered-By header with Cloudflare.
The CSP breakdown
If the page has a policy, a table lists each directive with its value, a result mark and a note. The tool reads default-src, script-src, object-src, base-uri, frame-ancestors, form-action, upgrade-insecure-requests and reporting, plus any other directive present.
The things it penalises most are a policy with no script restriction at all, 'unsafe-inline' in script-src when there is no nonce or hash, 'unsafe-eval', and wildcards such as *, https: or data: as script sources. It treats 'unsafe-inline' in style-src as low risk. When a nonce, hash or 'strict-dynamic' is present, it understands that modern browsers ignore 'unsafe-inline'.
A policy sent as report-only is analysed the same way and flagged with a note that nothing is blocked yet.
The cookie table
When the response sets cookies, each one gets a row with Secure, HttpOnly and SameSite. The tool warns about a missing Secure on an HTTPS site, a missing HttpOnly, no SameSite, SameSite=None without Secure (which browsers reject) and wrongly formed __Host- and __Secure- cookies. The cookie check is worth up to 10 points. A page that sets no cookies gets all 10.
Keep in mind that only the cookies set by the one scanned response are seen.
Recommended headers
The last panel writes ready-to-paste config. Two switches control it:
- Which headers: Missing & weak lists only what needs changing; Full set gives a complete reference configuration.
- Server platform: Nginx, Apache, Cloudflare or Next.js.
The Nginx output uses add_header … always; lines, and warns that an add_header inside a location block replaces the ones from the server block. Apache uses Header always set and needs mod_headers. The Cloudflare output gives a _headers file for Pages (with a ! line for every leaking header found) and a note on Transform Rules for proxied sites: Set static to add a header, Remove to delete one. Next.js gives a headers() function and poweredByHeader: false.
If the CSP is among the changes, the output carries a reminder to test it first as Content-Security-Policy-Report-Only.
What it accepts and its limits
- Only
httpandhttpsaddresses on ports 80, 443, 8080 and 8443. No usernames or passwords in the address, and no private or local addresses. - Always a GET request with the Chrome user agent, and always following redirects.
- Up to 20 scans a minute per visitor, shared with the HTTP Header Checker.
Privacy
Security Headers Checker runs on our server, not in your browser. The address goes to our server, which fetches that page and returns the headers. The handler does not save the result, and the usage counter only notes that a scan finished. The hosting provider's ordinary logs are outside what the page controls. Do not paste addresses that include private tokens.
A worked example
Suppose a scan shows two problems:
- HSTS:
max-age=2592000. The result is "Short max-age" with 10 of 20 points, and the note says max-age is 30 days and to use at least one year. - CSP:
default-src 'self'; script-src 'self' 'unsafe-inline'. script-src is red, object-src is not set to'none', and base-uri is missing, so the score is 25 − 12 − 3 − 2 = 8 and the verdict is Weak.
The fix for the first is to raise max-age to 31536000 or more. For the second, replace 'unsafe-inline' with a nonce or hash on the scripts you need, and add object-src 'none' and base-uri 'self'. Scan again to see the points come back.
Common problems and how to fix them
The page returned an error status
Scan a normal page. Error pages often send fewer headers.
I added the header but the scan still says Missing
Your change may not have reached the live server, a CDN may cache the old response, or the header is set in a location block that does not cover the scanned URL. In Nginx, remember the add_header rule above. Run the HTTP Header Checker and look in All response headers.
The grade is B though everything looks fine
Look for the first non-green row in Score breakdown. Cookie flags and COOP are the ones people forget.
Adding the CSP broke my site
Switch it to report-only, read the browser console for blocked resources and add the hosts you trust.
Related tools
- HTTP Header Checker: quick six-header grade plus caching and timing.
- SSL Checker: the certificate behind the HTTPS that HSTS depends on.
- SPF, DMARC and DKIM Checker: the email-side security records for the same domain.
- Redirect Checker: confirm HTTP leads to HTTPS in one hop before enabling HSTS.
Quick checklist
- Serve everything over HTTPS first, then add HSTS with a short max-age and raise it.
- Start CSP in report-only mode.
- Add
nosniff, framing protection and a Referrer-Policy. - Give every cookie Secure, HttpOnly and SameSite.
- Remove X-Powered-By and version numbers.



