Quick answers
What are HTTP security headers?
They are lines your web server sends with every page that tell the browser how to protect visitors: use only HTTPS (Strict-Transport-Security), which scripts may run (Content-Security-Policy), whether other sites may frame the page (X-Frame-Options or frame-ancestors), not to guess file types (X-Content-Type-Options), and how much to share with other sites (Referrer-Policy).
What is a good security headers grade?
On this checker, A means 90 or more of 100 points, B 75 or more, C 60 or more, D 45 or more and F anything lower. The full rubric is on this page. Other tools weigh headers differently, so compare the individual headers rather than letters from different tools.
Do I still need X-Frame-Options if I use CSP frame-ancestors?
The OWASP HTTP Headers Cheat Sheet recommends the Content-Security-Policy frame-ancestors directive, and MDN describes it as more comprehensive than X-Frame-Options. Sending both does no harm and covers older browsers. This checker gives full marks for either.
What HSTS max-age should I use?
The HSTS preload list requires at least 31536000 seconds (one year) with includeSubDomains and preload, and the OWASP Secure Headers Project recommends 63072000 (two years) with includeSubDomains. hstspreload.org suggests building up from 300 seconds to one week and then one month first, so a mistake does not lock visitors out for long.
Should I hide the Server header?
MDN advises against detailed Server values because they can help attackers match your software to known vulnerabilities, and the OWASP cheat sheet says to remove X-Powered-By. Hiding them is limited protection; keeping the software patched matters more.
Does a good grade mean my website is secure?
No. Headers are one layer of browser protection on one page. They say nothing about out-of-date software, exposed files or weak logins. A free external vulnerability scan from AvalonX looks at your whole domain. It is a scan, not a penetration test.
How is the grade worked out?
Every check is worth a fixed number of points, 100 in total. The grade bands are: A 90 or more, B 75 or more, C 60 or more, D 45 or more, F below 45. If the site does not finish on HTTPS, the grade is F. These are the exact rules the checker uses:
| Check | Points | How it is scored |
|---|---|---|
| HTTP redirects to HTTPS | 10 | 10 if http:// redirects to https://; 0 if a page is served over plain HTTP; 5 if plain HTTP did not answer or answered with an error, so we could not tell. |
| Strict-Transport-Security (HSTS) | 20 | 15 for max-age of at least 31536000 seconds (1 year), 8 for a shorter max-age, 0 if missing or max-age=0; plus 5 for includeSubDomains. |
| Content-Security-Policy | 20 | 12 for an enforced policy (4 if report-only); plus 8 if script-src or default-src avoids 'unsafe-inline' (unless a nonce or hash is used), 'unsafe-eval' and wildcards. |
| Clickjacking protection | 15 | 15 for X-Frame-Options DENY or SAMEORIGIN, or a CSP frame-ancestors directive; 0 otherwise. |
| X-Content-Type-Options | 10 | 10 for nosniff; 0 otherwise. |
| Referrer-Policy | 10 | 10 for no-referrer, same-origin, strict-origin or strict-origin-when-cross-origin; 6 for origin or origin-when-cross-origin; 5 if missing (browsers default to strict-origin-when-cross-origin); 0 for unsafe-url or no-referrer-when-downgrade. |
| Permissions-Policy | 5 | 5 if present; 0 otherwise. |
| No version disclosure | 10 | 10, minus 5 if the Server header contains a version number and minus 5 if X-Powered-By (or X-AspNet-Version) is sent. |
What does each security header do?
Strict-Transport-Security (HSTS)
HSTS, defined in RFC 6797, tells the browser to use only HTTPS for your site for the number of seconds in max-age, which is required. includeSubDomains extends that to every subdomain. Browsers ignore the header when it arrives over plain HTTP, and max-age=0 switches it off. The HSTS preload list, which browsers ship with, requires a max-age of at least 31536000 seconds (one year), includeSubDomains, the preload directive and an HTTP-to-HTTPS redirect; MDN notes that preloading is not part of the HSTS specification. US federal agencies were required to use HTTPS and HSTS under CISA BOD 18-01.
Fix: Strict-Transport-Security: max-age=31536000; includeSubDomains, once every subdomain serves HTTPS.
Content-Security-Policy (CSP)
Content-Security-Policy controls which resources a page may load, mainly to guard against cross-site scripting (XSS). A policy that still allows 'unsafe-inline' scripts, 'unsafe-eval' or any host gives little protection against injected scripts. Content-Security-Policy-Report-Only lets you test a policy without blocking anything.
Fix: start in report-only mode with a script-src listing the hosts you actually load scripts from, read the reports, then enforce it.
X-Frame-Options and frame-ancestors
These stop other sites from loading your pages in a frame, the trick behind clickjacking. X-Frame-Options takes DENY or SAMEORIGIN; its ALLOW-FROM value is obsolete. The CSP frame-ancestors directive does the same job, and MDN describes it as more comprehensive. The OWASP HTTP Headers Cheat Sheet recommends frame-ancestors.
Fix: Content-Security-Policy: frame-ancestors 'self', plus X-Frame-Options: SAMEORIGIN for older browsers.
X-Content-Type-Options
X-Content-Type-Options has one value, nosniff, which tells the browser to trust the declared file type rather than guess.
Fix: X-Content-Type-Options: nosniff.
Referrer-Policy
Referrer-Policy controls how much of the page address is sent to other sites when someone follows a link. When no policy is set, browsers default to strict-origin-when-cross-origin, which sends only your domain to other sites. unsafe-url sends full addresses, including any query strings.
Fix: Referrer-Policy: strict-origin-when-cross-origin.
Permissions-Policy
Permissions-Policy lets a site allow or block browser features such as the camera, microphone and location for its own pages and any frames. MDN marks it as experimental, with limited availability across browsers.
Fix: switch off what you do not use, for example Permissions-Policy: camera=(), microphone=(), geolocation=().
Server and X-Powered-By
MDN advises against detailed Server values, because version numbers can help an attacker find known vulnerabilities, and notes that hiding them is limited protection compared with keeping software patched. The OWASP cheat sheet says to remove X-Powered-By, and the OWASP Secure Headers Project lists both among headers to remove. The same cheat sheet advises not setting X-XSS-Protection, or setting it to 0.
Where do you add security headers?
Wherever your site is served from: your web server configuration, your hosting platform's settings or headers file, or your CDN. Add them to every response, not just the home page, then run this checker again. The OWASP Secure Headers Project best practices list recommended values for each header.
What does this checker do?
It sends one request to https:// plus your domain, following up to 5 redirects, and one to the plain http:// address to see whether it redirects to HTTPS, with an 8-second limit. If the bare domain does not answer, it tries the www. address once. It reads the response headers only; page content is not read. If a site refuses the request, for example with HTTP 403, it is not graded, because those headers belong to the refusal page rather than the page your visitors get. It checks the home page only, so other pages may send different headers. Results are cached for up to 10 minutes, and we do not store the domains you check.
More free tools
Sources
- IETF, RFC 6797, HTTP Strict Transport Security (HSTS), November 2012 (sections 6.1.1, 6.1.2, 7.2, 8.1). https://www.rfc-editor.org/rfc/rfc6797
- HSTS Preload List Submission, submission requirements, viewed 5 December 2026. https://hstspreload.org/
- MDN Web Docs, Strict-Transport-Security. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security
- MDN Web Docs, Content-Security-Policy. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy
- MDN Web Docs, X-Frame-Options. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Frame-Options
- MDN Web Docs, X-Content-Type-Options. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Content-Type-Options
- MDN Web Docs, Referrer-Policy. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy
- MDN Web Docs, Permissions-Policy. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Permissions-Policy
- MDN Web Docs, Server. https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server
- OWASP Cheat Sheet Series, HTTP Security Response Headers Cheat Sheet, viewed 5 December 2026. https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html
- OWASP Secure Headers Project. https://owasp.org/www-project-secure-headers/
- OWASP Secure Headers Project, Best Practices. https://secure-headers-project.owasp.org/best-practices/
- CISA, Binding Operational Directive 18-01: Enhance Email and Web Security, 16 October 2017. https://www.cisa.gov/news-events/directives/bod-18-01-enhance-email-and-web-security
Last reviewed 5 December 2026. Summaries, not legal advice. Standards and policies change, so check each source before you rely on it.