Security headers checker
A security headers check for one URL, HSTS, CSP, X-Frame-Options and the rest, each with a status and an explanation
- Free
- No account required
This security headers checker fetches a public URL from our server and reads the HTTP response headers that tell a browser how to protect the page: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options or frame-ancestors, X-Content-Type-Options, Referrer-Policy and Permissions-Policy, plus Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy. Each header gets a status and a short explanation. It also flags Server and X-Powered-By headers that reveal your server software. The result is a signal about browser configuration; finding vulnerabilities in the application itself takes a security test.
Which headers to fix first
Start with HSTS and nosniff. Each is one line in the server or CDN config and rarely breaks anything. HSTS needs the whole site on HTTPS, so start with a shorter max-age, check that every subdomain answers over HTTPS, and only then raise it to a year.
CSP takes the most work and gives the most back. A policy that still allows 'unsafe-inline' scripts stops few XSS attacks. Start with Content-Security-Policy-Report-Only, watch the reports for a week or two, then switch to the enforcing header. You can build the policy in our CSP generator.
Framing and referrer are quick wins. frame-ancestors 'self' (or X-Frame-Options: SAMEORIGIN for older browsers) blocks clickjacking. Referrer-Policy: strict-origin-when-cross-origin keeps paths and query strings, which sometimes hold tokens or email addresses, away from other sites.
Check who sets the headers. A CDN or proxy can add, change or strip a header after your application sends it. We saw this on cometweb.io, where the edge replaced our full CSP with a single directive. This tool shows what reaches a visitor, so if the result differs from your config, look at the layer in between.
Check several kinds of response
Headers usually come from three layers: the application, the web server and the CDN, and rules often cover only some responses. Check the home page, one inner page and an error page, such as a URL that returns 404. The differences show which layer adds a header and which one skips it.
OWASP, Secure Headers ProjectHow to add HTTP security headers to a website
You add security headers in one place: the server, the CDN or the application. This order starts with the changes that rarely break anything.
-
Check what the site sends today
Enter the URL in the tool above and save the result. Also find out which layer sets the headers, because a CDN or proxy can add, change or strip them after the application.
-
Add the headers that block nothing
X-Content-Type-Options: nosniff,Referrer-Policy: strict-origin-when-cross-originand aPermissions-Policythat turns off unused features. That is a few lines of config. -
Turn on HSTS with a short max-age
Start with a few days or a week, check that every subdomain works over HTTPS, and only then raise
max-ageto a year. Rolling back a long HSTS takes as long as you set. -
Set framing protection
Add
frame-ancestors 'none'or'self'to your CSP. If you still care about very old browsers, also sendX-Frame-Options: DENYorSAMEORIGIN. -
Roll out CSP through Report-Only and check again
Content-Security-Policy needs a list of sources, so you roll it out separately, first without blocking. After each change, run this tool again and compare the result.
Example security headers in a server config
These values are a reasonable starting point for a typical company site. Build the CSP separately in the CSP generator.
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), camera=(), microphone=()" always;
add_header X-Frame-Options "DENY" always; If a location block has even one add_header, nginx does not inherit the headers from the server block. Repeat them there or keep them in one file pulled in with include.
Strict-Transport-Security: max-age=604800Strict-Transport-Security: max-age=31536000; includeSubDomains; preloadA week to start, a year with includeSubDomains and preload only once you know every subdomain works over HTTPS. Those are the values the preload list requires.
ServerTokens Prod
Header always unset X-Powered-By ServerTokens Prod leaves only the server name in the Server header, without the version or modules.
Common security header mistakes
-
A one-year HSTS without checking subdomains
With
includeSubDomains, the browser opens every subdomain over HTTPS. An admin panel or an old service without a certificate stops working for anyone who visited the main site. -
Headers set in the app, then changed by the CDN
Configuring them in code is only half the job. Check the response from the public URL, because the edge layer can replace or remove a header.
-
X-Frame-Options in a meta tag
Browsers ignore
X-Frame-Optionsset in a<meta>tag. It only works as an HTTP header, just likeframe-ancestors. -
Headers only on 200 responses
Without the
alwaysparameter, nginx does not add headers to error pages such as 404 and 500. The error page then gets weaker protection than the rest of the site. -
Sending X-XSS-Protection: 1
OWASP recommends not setting this header or turning it off with
0, because in some cases it creates a vulnerability of its own. CSP is what protects against XSS.
Security headers in the data and the specs
| Value | What it means | Source |
|---|---|---|
| 36% | Share of mobile pages sending Strict-Transport-Security in the HTTP Archive crawl of July 2025. | Web Almanac 2025, Security |
| 31536000 s | Minimum max-age for submitting a domain to the HSTS preload list, which is one year. includeSubDomains and preload are required too. | hstspreload.org |
| HTTPS only | Browsers ignore Strict-Transport-Security sent over HTTP. Protection starts after the first HTTPS connection, unless the domain is on the preload list. | MDN, Strict-Transport-Security |
| strict-origin-when-cross-origin | The default browser Referrer-Policy when a site sets none. Other domains get only the origin, without the path or query string. | MDN, Referrer-Policy |
| DENY, SAMEORIGIN | The two current X-Frame-Options values. ALLOW-FROM is obsolete, and modern browsers then ignore the whole header. | MDN, X-Frame-Options |
| X-XSS-Protection: 0 | OWASP guidance for the old XSS filter: do not set the header, or turn it off with zero, and rely on a CSP without inline scripts. | OWASP, HTTP Headers Cheat Sheet |
Sources checked:
Abbreviations in the result
- HSTSStrict-Transport-Security
- Enforces HTTPS for the time set in max-age.
- CSPContent-Security-Policy
- The allowed sources of scripts, styles and other resources.
- XFOX-Frame-Options
- The older way to stop a page being framed.
- COOPCross-Origin-Opener-Policy
- Isolates the page window from other sites' windows.
- CORPCross-Origin-Resource-Policy
- Sets who may load a given resource.
Enter the URL and choose Check headers. Our server fetches the page the way a browser does, follows redirects and reads the response headers of the final page. You get each header with a status and an explanation. In a browser you can see the same data in the developer tools: the Network tab, the first document request, the Response Headers section.
Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options: nosniff, protection against framing (frame-ancestors or X-Frame-Options), Referrer-Policy and Permissions-Policy. Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy help sites that need cross-origin isolation or serve files to other domains.
Usually a year, which is 31536000 seconds. That is also what the browsers' preload list requires, together with includeSubDomains and preload. We mark a value under 180 days as weak. While rolling it out, start shorter and raise it once you know every subdomain works over HTTPS.
Most often because of 'unsafe-inline' or 'unsafe-eval' in script-src, a wildcard as a script source, or no script-src and no default-src at all. A policy sent only as Report-Only is weak too, because it blocks nothing. Instead of 'unsafe-inline', use nonces or hashes for the scripts you need.
frame-ancestors in CSP is the current standard and can name several sites. X-Frame-Options only knows DENY and SAMEORIGIN. When both are set, browsers that support frame-ancestors use frame-ancestors. Sending both makes sense if you still care about very old browsers.
Remove X-Powered-By, since browsers do not use it. From Server, remove at least the version number. Hiding them does not patch any vulnerability, but it stops hinting where to start an attack.
A good result means the browser gets sensible instructions. Headers will not find SQL injection, weak passwords or outdated plugins. Treat the result as one signal and check the application separately, for example with a security test.
Our server fetches the URL, so it reaches our logs. We do not keep the results. Private and local addresses are rejected, including after a redirect.
No. OWASP recommends not sending X-XSS-Protection or setting it to 0, because in some cases it creates an XSS vulnerability in a site that would otherwise be safe. Protection against XSS comes from a Content-Security-Policy without inline scripts.
You turn off HSTS by sending Strict-Transport-Security: max-age=0 over HTTPS. The browser only removes the entry on its next HTTPS visit, so visitors who do not come back keep the old rule until its max-age runs out.
Set security headers in one layer that handles every response, usually the server or the CDN. Setting them in several places at once ends in duplicate or conflicting values that are hard to trace later.
What else might come in handy
This test checks one thing on one page
TLS, headers, cookies and exposure, with a score breakdown and a remediation plan.