Security Headers Checker — grade your HTTP headers A+ to F
Scan any URL for Content-Security-Policy, HSTS, X-Frame-Options, Referrer-Policy and Permissions-Policy. Get an A+ to F grade, a directive-by-directive CSP review, and copy-paste config for nginx, Apache, Cloudflare, Netlify and Vercel.
How it works
-
Enter any URL
A home page, a login page, a checkout. We request it like a browser, follow the redirects, and read the raw response headers.
-
Every header graded
Graded on Mozilla HTTP Observatory's scale, the same grade Monity's monitoring gives the page; cookies, version leaks, third-party scripts without integrity checks and deprecated headers are reviewed too.
-
Copy the fix
Exact lines for nginx, Apache, Cloudflare, Netlify or Vercel — including a report-only Content-Security-Policy built from the scripts your page already loads.
What HTTP security headers do
Every time a browser loads a page, the server sends a set of response headers along with the HTML. A handful of them are security instructions: they tell the browser which scripts it may run, whether it must always use HTTPS, whether other sites may embed the page, and what it may reveal to third parties. They're free to send, invisible to visitors, and they shut whole classes of attacks — cross-site scripting, clickjacking, SSL stripping — even when something else goes wrong. This checker fetches any URL, follows its redirects, reads the raw headers and grades them A+ to F on Mozilla HTTP Observatory's scale, the same grade Monity's security monitoring gives the page.
The headers that carry the grade
Content-Security-Policy (+10 to −25)
The strongest single defence against injected scripts. A CSP lists where scripts, styles, images and connections may come from, and the browser refuses everything else — so a script slipped in through a vulnerable plugin or a compromised third party doesn't run. The checker reviews the policy directive by directive and flags the classic weaknesses:
'unsafe-inline'inscript-srcwithout a nonce or hash, which lets any injected inline script run;'unsafe-eval', which turns injected text into code;- wildcards and scheme-only sources such as
*,https:ordata:, which allow scripts from anywhere; - allowlisted hosts known to serve JSONP or old AngularJS builds, which attackers use to run code from a "trusted" origin;
- no
object-src 'none'and nobase-uri, two easy-to-forget gaps thatdefault-srcdoesn't fully cover.
A nonce or hash makes browsers ignore 'unsafe-inline', so the usual fallback for old browsers is
not counted against you, and 'strict-dynamic' is understood. A policy sent only as
Content-Security-Policy-Report-Only is detected too, but scores as no policy: it's the right way
to start, and it blocks nothing.
Strict-Transport-Security (0 to −20)
HSTS tells the browser to use HTTPS for your site from now on, so a visitor's first request can't go out over
plain http:// and be intercepted before your redirect arrives. Six months of
max-age is the usual minimum; one year with includeSubDomains is the standard
recommendation, and the requirement for the browsers' preload list. A shorter max-age costs
10 points, and max-age=0, which switches HSTS off, is called out as such.
X-Frame-Options or frame-ancestors (+5 to −20)
Stops other websites from loading your page inside an invisible frame and tricking visitors into clicking
buttons on it (clickjacking). X-Frame-Options: SAMEORIGIN works everywhere; the CSP directive
frame-ancestors is the modern replacement and also counts, though frame-ancestors *
is reported as protecting nothing. The old ALLOW-FROM value is ignored by current browsers, so it
scores nothing.
Referrer-Policy (+5 to −5)
Decides how much of the current URL is sent to other sites when visitors click a link or the page loads a
resource. URLs often carry search terms, account IDs or reset tokens, so strict-origin-when-cross-origin
or stricter is recommended; unsafe-url, no-referrer-when-downgrade and the
origin policies cost points, and unsafe-url is flagged because it sends everything,
everywhere. A missing header costs nothing: current browsers default to a safe policy.
X-Content-Type-Options (0 to −5)
One value, nosniff, stops browsers from second-guessing a file's type — so an uploaded "image"
can't be run as a script.
Permissions-Policy (reviewed, not scored)
Switches off browser features you don't use — camera, microphone, geolocation, payment — so neither injected
code nor a third-party widget can ask for them. A policy that grants a feature to every origin with
=* is flagged. Like the Observatory, the grade does not score it.
Beyond the six
The report also covers what a real security review would mention: cookies (scored: every cookie needs
Secure, and session or login cookies also need HttpOnly; a consent cookie your own
script must read does not), server software and version numbers leaking through
Server, X-Powered-By or a generator tag, third-party scripts loaded without
Subresource Integrity, mixed http:// content, and headers that are now obsolete — X-XSS-Protection
(set it to 0 or drop it), Expect-CT and Public-Key-Pins. Cross-origin isolation
headers (COOP, COEP, CORP) earn bonus points when set; they're useful in specific cases rather than a baseline
requirement.
How the grade works
The grade follows Mozilla HTTP Observatory: every page starts at 100, each test adds or takes away points, and the bonuses only count once the penalties alone leave 90 or more. A+ is 100 or more, A 90, A- 85, B+ 80, B 70, B- 65, C+ 60, C 50, C- 45, D+ 40, D 30, D- 25 and anything lower is an F. A page served over plain HTTP gets no HSTS credit and is flagged as critical, because none of the other headers can protect traffic that's readable in transit. Three of the Observatory's tests need more than this one response — the http-to-https redirect, Subresource Integrity on scripts and the browsers' HSTS preload list — so they are not scored here, and the Observatory's own score for a site can differ by those points. The grading is the same code Monity's security monitoring uses on every check, so this page and a monitor give the same grade.
Fixing it: copy-ready config
The report ends with the exact lines to add for nginx, Apache, Cloudflare, Netlify or Vercel — only the
headers that are missing or wrong, so working settings aren't overwritten. For a site with no
Content-Security-Policy, the suggestion is a report-only policy built from the third-party
scripts and stylesheets the page already loads. Deploy it, read the violation reports for a week or two (in
the browser console, or with a report-to endpoint), allow what's legitimate, give inline scripts
a nonce, and then switch the header name to Content-Security-Policy.
Headers are often set in several places — the CDN, the web server, the application, plugins — so scan the pages that matter most rather than only the home page: login, account and checkout pages frequently differ.
Related checks
Security headers sit on top of a valid HTTPS setup; check the certificate, its chain and its expiry with the
SSL Certificate Checker. The
SEO & AI Visibility Audit reviews the
same page for search and AI visibility, and the
Redirect Checker confirms every
http:// variant lands on HTTPS in one hop.
Headers change. Monity notices.
A deploy, a CDN migration or a plugin update can drop a header without any visible change to the page. Monity re-checks your pages on a schedule and alerts you in email, Slack or Teams when a security header changes or disappears, and its script watch flags new script origins and modified third-party scripts — change detection that helps with PCI DSS 4.0 requirements 6.4.3 and 11.6.1 on payment pages. The free plan includes three monitors, forever.
To have this checked for you on a schedule, with an alert when it changes, see Website security monitoring for scripts, headers and SSL.
FAQ
Common questions
What are HTTP security headers?
Instructions your server sends with every page that tell the browser how to protect visitors: only load scripts from these places (Content-Security-Policy), always use HTTPS (Strict-Transport-Security), don't let other sites frame this page (X-Frame-Options), don't guess file types (X-Content-Type-Options), don't leak full URLs (Referrer-Policy), and keep the camera and microphone off (Permissions-Policy). They cost nothing to send and close whole classes of attacks.
How is the grade calculated?
The way Mozilla HTTP Observatory grades it: every page starts at 100 and each test adds or takes away points — no Content-Security-Policy or a report-only one −25, a CSP that lets injected scripts run −20, no HSTS −20, no framing protection −20, a session cookie readable by scripts −30, a private Referrer-Policy +5, and so on. Bonuses count only once the penalties alone leave 90 or more. A+ is 100 or more, A 90, B 70, C 50, D 30, with plus and minus grades in between; below 25 is F. The Observatory's redirect, Subresource Integrity and HSTS-preload tests need more than one response and are not scored here. Monity's security monitoring uses the same grading, so both give a page the same grade.
Will adding a Content-Security-Policy break my site?
An enforcing one can, which is why the suggested policy starts as Content-Security-Policy-Report-Only: the browser reports what it would have blocked and blocks nothing. The starter policy is built from the third-party scripts and stylesheets this page already loads, so most reports are things you genuinely need to allow — or inline scripts that need a nonce. When the reports go quiet, rename the header and it starts protecting visitors.
Do I still need X-Frame-Options and X-XSS-Protection?
X-Frame-Options, yes — unless your CSP has frame-ancestors, which replaces it in modern browsers; sending both is harmless. X-XSS-Protection, no: browsers removed the XSS filter it controlled, and its old "block" mode could itself be abused. Send X-XSS-Protection: 0 or nothing, and rely on a Content-Security-Policy.
Why do different pages on my site get different grades?
Headers are often set in more than one place: the CDN, the web server, the application, and plugins. A marketing site on one platform and an app or checkout on another rarely send the same set, and error pages often skip headers that only the application adds. Scan the pages that matter most — login, account, checkout — not just the home page.
Can I get alerted when my security headers change?
Yes. Monity re-checks your pages on a schedule and alerts you in email, Slack or Teams when a security header changes or disappears and the change holds on the next check, and its script watch flags new script origins and changed third-party scripts — change detection that helps with PCI DSS 4.0 requirements 6.4.3 and 11.6.1 on payment pages. The free plan includes 3 monitors forever.
Headers disappear in deploys, CDN changes and plugin updates.
Monity notices the same day.
Monity re-checks your pages on a schedule and alerts you when a security header changes or a new third-party script shows up — change detection that helps with PCI DSS 4.0 on payment pages.
- Free 7-day trial
- No credit card
- 3 monitors free, forever