HTTP security headers test: check HSTS, CSP & more

This free test grades your website's HTTP security headers across more than 30 individual checks – from HSTS and the quality of your Content-Security-Policy to cookie flags, CORS, mixed content and information leaks – and gives you a concrete recommendation for every finding. Check your domain →

The five must-have headers

Getting your CSP right

A plain host allowlist with unsafe-inline is often bypassable – strong policies are nonce- or hash-based and use strict-dynamic. That is why the test grades not just whether a CSP is set, but how good it is: unsafe sources (unsafe-inline, unsafe-eval, wildcards), hardening directives (object-src, base-uri, form-action), upgrade-insecure-requests, Trusted Types, sandbox, and whether violations are reported. A policy that runs in report-only mode does not protect you yet.

Cookies: Secure, HttpOnly, SameSite

Cookies without Secure can be read over HTTP, without HttpOnly they can be stolen via JavaScript (XSS), and without SameSite they can be abused for CSRF. The test checks every cookie you set for these attributes and also recognises the __Host-/__Secure- name prefixes, which force the attributes on the browser side.

Remove obsolete headers

What else the test checks

Cross-origin isolation (COOP/COEP), Permissions-Policy, Origin-Agent-Cluster, mixed content, Subresource Integrity, CORS configuration (Access-Control-Allow-Origin wildcards), Cache-Control on authenticated responses, technology disclosure through Server/X-Powered-By banners and the security.txt (RFC 9116). The full grading logic for every check is in the explanations.

Frequently asked questions

Which security headers are the most important?

Five headers form the baseline: Strict-Transport-Security (HSTS) forces HTTPS, the Content-Security-Policy limits the damage of XSS, X-Content-Type-Options: nosniff prevents MIME sniffing, frame-ancestors (or X-Frame-Options) protects against clickjacking, and the Referrer-Policy limits data leaking through the referer. Everything else is additional hardening.

Should I still set X-XSS-Protection?

No. The browsers' XSS auditor was removed and could cause security problems of its own (XS-Leaks). The header should be omitted or set to 0; the actual XSS protection today comes from the Content-Security-Policy.

How does this test differ from securityheaders.com?

securityheaders.com established header grading as a standalone tool. This test checks the headers as one of six modules in the context of the whole domain – and additionally covers cookie flags, CORS configuration, Cache-Control on authenticated responses, mixed content and information leaks such as server banners. Detailed comparison →

Sources

RFC 6797 (HSTS) ↗ · W3C CSP Level 3 ↗ · OWASP Secure Headers Project ↗ · RFC 9116 (security.txt) ↗