Security

Security Headers Checker

Grade your HTTP security headers — CSP, HSTS, X-Frame-Options, and more.

About Security Headers

Grades a site's HTTP security headers — Content-Security-Policy, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and others — against current best practice, and reports what's present, missing, or misconfigured. Missing security headers are one of the most common, easily-fixed findings in a basic security audit. The grade breaks down by header rather than giving one opaque score, since each header serves a distinct purpose — HSTS prevents protocol downgrade, X-Frame-Options prevents clickjacking, CSP restricts what a page can load.

A high score here is defense-in-depth, not a substitute for fixing the underlying vulnerabilities these headers guard against — CSP and X-Frame-Options reduce the blast radius of an XSS or clickjacking bug, they don't prevent the bug from existing in application code.

📖 Read more in our Knowledge Base →

Recommended values

HeaderGood starting value
Strict-Transport-Securitymax-age=31536000; includeSubDomains
Content-Security-PolicySite-specific. Start with the CSP generator.
X-Content-Type-Optionsnosniff
X-Frame-OptionsDENY or SAMEORIGIN (or CSP frame-ancestors)
Referrer-Policystrict-origin-when-cross-origin
Permissions-Policycamera=(), microphone=(), geolocation=() for features you don't use
Cross-Origin-Opener-Policysame-origin; use same-origin-allow-popups if sign-in popups break
Cross-Origin-Resource-Policysame-site. Be careful on assets other sites are meant to embed.

Headers you can drop

X-XSS-Protection is deprecated; modern browsers ignore it, and current advice is to omit it or set it to 0. Expect-CT is obsolete. Version strings in Server and X-Powered-By only help attackers.

Where to set them

  • nginx: add_header X-Content-Type-Options "nosniff" always; Watch out: an add_header inside a location block replaces all the ones from the server block, so headers silently disappear on some paths.
  • Apache: Header always set X-Content-Type-Options "nosniff"
  • Behind a CDN, headers can also be added at the edge, which covers cached responses too.

Be careful with HSTS

Once a browser has seen HSTS, it refuses plain HTTP for that domain until max-age runs out. Every subdomain must work over HTTPS before you add includeSubDomains. If you are unsure, start with a short max-age such as 300, and add preload only when you are certain: removal from the preload list takes months.