‹ TOOLS  /  SECURITY HEADERS
 SECURITY HEADERS

HTTP Security Headers Checker

Request any URL and get a graded report on HSTS, CSP, X-Frame-Options, Referrer-Policy, Permissions-Policy, and cross-origin isolation headers — with fix recommendations.

WATCH THE WHOLE SITE

Headers are one signal. SEODECK audits every page of your site daily — status codes, canonicals, noindex, titles, speed, certificate — and emails you the day something breaks. Run the free SEO check or start 30 days free.

About this grade

Our score weights modern-web protections: HSTS and CSP carry the most weight (25 each), X-Content-Type-Options / X-Frame-Options / Referrer-Policy / Permissions-Policy carry 10 each, and COOP/COEP 5 each. A grade of A requires all critical headers present with strict values. We follow conventions from SecurityHeaders.com and Mozilla Observatory, adjusted to 2026 best practices.

What HTTP security headers do

Security headers are instructions a server sends with every response, telling the browser what it is and is not allowed to do with the page. They cost nothing to add and they are enforced by the browser itself, which makes them among the cheapest defences available — and among the most commonly missing.

None of them fix a vulnerability in your application. What they do is limit the damage when one exists: a Content-Security-Policy turns an injected script into a blocked request, and HSTS turns a downgrade attack into a failed connection.

The headers that matter

HeaderWhat it preventsSensible value
Strict-Transport-Security Downgrade to HTTP, cookie theft over open Wi-Fi max-age=63072000; includeSubDomains; preload
Content-Security-Policy Cross-site scripting, injected third-party resources default-src 'self'
X-Content-Type-Options MIME sniffing — a text upload executed as script nosniff
X-Frame-Options Clickjacking via an invisible iframe DENY
Referrer-Policy Leaking full URLs (and their query strings) to third parties strict-origin-when-cross-origin
Permissions-Policy Access to camera, microphone, geolocation by embedded content camera=(), microphone=(), geolocation=()
Cross-Origin-Opener-Policy Cross-window attacks; enables process isolation same-origin

Content-Security-Policy is the hard one

CSP is the most powerful header and the only one that reliably breaks a working site when misconfigured. It works by listing the sources a page may load from; anything not listed is blocked. That is exactly the point, and exactly the problem — inline scripts, analytics, fonts and embedded widgets all have to be accounted for.

Deploy it in report-only mode first. The browser reports what would have been blocked without blocking it, so you can fix the policy against real traffic rather than guessing:

Content-Security-Policy-Report-Only: default-src 'self'; report-uri /csp-report

Once the reports are quiet, switch the header name to Content-Security-Policy and it starts enforcing.

A note on 'unsafe-inline': it is common, and it removes most of CSP's protection against cross-site scripting, because an injected inline script is indistinguishable from one you wrote. Nonces or hashes are the alternative. Many sites ship 'unsafe-inline' permanently and still benefit from the rest of the policy — but it is a compromise, not a default worth keeping quietly.

HSTS and the preload list

Strict-Transport-Security tells the browser to refuse plain HTTP for your domain for the duration of max-age. It closes the window where a first request over HTTP can be intercepted before the redirect to HTTPS.

Adding preload submits your domain to a list compiled into browsers, so even a first-ever visit is protected. Two things to understand before you do it:

X-Frame-Options vs frame-ancestors

Both stop your pages being framed. X-Frame-Options is the older header; frame-ancestors is the CSP directive that replaced it and is the one modern browsers honour when both are present.

Send both. X-Frame-Options: DENY covers older clients, frame-ancestors 'none' covers current ones, and they cost a few bytes:

X-Frame-Options: DENY Content-Security-Policy: frame-ancestors 'none'

If you legitimately need to be embedded, list the permitted origins in frame-ancestors rather than dropping the protection entirely.

How to check your security headers

Enter a URL in the checker above for a graded report. To inspect them yourself:

# show response headers only curl -sI https://example.com # just the security-relevant ones curl -sI https://example.com | grep -iE 'strict-transport|content-security|x-frame|x-content-type|referrer-policy|permissions-policy'

Headers are set wherever your responses originate — the web server config, the CDN, or the hosting platform. Check the layer closest to the user first: a CDN can add or strip headers your origin thinks it is sending.

Common mistakes

MistakeWhy it matters
HSTS with a short max-ageA few hours of protection. Use two years once you are confident.
CSP with 'unsafe-inline' and 'unsafe-eval'Most of the cross-site scripting protection is gone.
Setting headers on HTML onlyAPI and asset responses go unprotected. Apply them to every response.
Headers set at origin, stripped by the CDNWhat you configured is not what users receive. Always test the public URL.
preload without full subdomain HTTPSSubdomains become unreachable, and reversing it takes months.

Related checks