Skip to main content
Free tool

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

Our server fetches the URL, so it reaches our logs. Private and local addresses are rejected, including after a redirect.

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.

About the tool

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.

In practice

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 Project
Step by step

How 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.

  1. 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.

  2. Add the headers that block nothing

    X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin and a Permissions-Policy that turns off unused features. That is a few lines of config.

  3. 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-age to a year. Rolling back a long HSTS takes as long as you set.

  4. Set framing protection

    Add frame-ancestors 'none' or 'self' to your CSP. If you still care about very old browsers, also send X-Frame-Options: DENY or SAMEORIGIN.

  5. 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.

Examples

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.

Nginx, headers without CSP
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.

HSTS during rollout
Before
Strict-Transport-Security: max-age=604800
After
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

A 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.

Apache, headers that reveal your software
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 mistakes

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-Options set in a <meta> tag. It only works as an HTTP header, just like frame-ancestors.

  • Headers only on 200 responses

    Without the always parameter, 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.

Numbers and sources

Security headers in the data and the specs

ValueWhat it meansSource
36%Share of mobile pages sending Strict-Transport-Security in the HTTP Archive crawl of July 2025.Web Almanac 2025, Security
31536000 sMinimum max-age for submitting a domain to the HSTS preload list, which is one year. includeSubDomains and preload are required too.hstspreload.org
HTTPS onlyBrowsers 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-originThe 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, SAMEORIGINThe 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: 0OWASP 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:

Glossary

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.
Security module in Insight

This test checks one thing on one page

TLS, headers, cookies and exposure, with a score breakdown and a remediation plan.