Security Headers Checker

Analyze your site's HTTP security headers. Get a grade from A+ to F, see what's missing, and get exact config snippets for Nginx and Apache.

Why Security Headers Matter for Every Website

Security headers are the fastest, cheapest security improvement most websites can make. A single nginx.conf or .htaccess change can add six or more layers of browser-enforced security in minutes — no code deploys, no library updates, no security audits required.

The headers that have the biggest impact:

  • Content-Security-Policy (25 pts): The most valuable header. A strict CSP eliminates entire classes of XSS attacks by whitelisting which scripts can run and where content can load from. Even a simple default-src 'self' policy blocks the majority of XSS payloads.
  • Strict-Transport-Security (15 pts + 5 bonus): Permanently upgrades your site to HTTPS in the browser cache. The preload directive extends this to all browsers globally, eliminating the risk of the first-visit HTTP downgrade.
  • X-Frame-Options + CSP frame-ancestors (10 pts): Prevents clickjacking by stopping other sites from embedding your page in an iframe and overlaying invisible UI elements to steal clicks.
  • X-Content-Type-Options (10 pts): The easiest win — one line prevents browsers from second-guessing your declared content types, blocking a whole class of content-type confusion attacks.
  • Referrer-Policy (10 pts): Prevents user session tokens, internal paths, and sensitive query parameters from leaking to third-party sites via the HTTP Referer header.

How to read your grade

The tool assigns a letter grade from A+ to F based on which headers are present and how strict each policy is. An A+ requires CSP, strict HSTS with preload, X-Content-Type-Options, frame ancestors, Referrer-Policy, and Permissions-Policy. A missing CSP alone can drop you to a C.

  • A / A+: modern, defense-in-depth posture.
  • B / C: essentials present but CSP or HSTS is weak.
  • D / F: exposed to trivial clickjacking, MIME-sniffing, or mixed- content attacks.

Common issues and fixes

  • CSP with unsafe-inline and unsafe-eval: defeats XSS protection — refactor to nonces or hashes.
  • HSTS without preload: first-visit users are still vulnerable to downgrade; submit to the preload list after confirming HTTPS everywhere.
  • Both X-Frame-Options and frame-ancestors: modern browsers honor frame-ancestors and ignore X-Frame-Options — keep both for legacy coverage but make them consistent.
  • Missing Permissions-Policy: third-party iframes can access camera/geolocation by default; add an explicit deny list.
  • Referrer-Policy unsafe-url or unset: leaks full URLs cross-origin — use strict-origin-when-cross-origin.

What to do next

Roll out CSP in Content-Security-Policy-Report-Only mode first, collect violation reports for a week, then enforce. Audit every third-party script before whitelisting its origin.

For continuous monitoring, FlashMon.app tracks changes automatically and alerts you the moment something breaks.

Monitor security headers continuously

Get alerted the moment your security headers change — detect misconfigurations and configuration drift before they become vulnerabilities.

Start Free Trial

Frequently Asked Questions