Security Headers Check

Check whether a website sends the HTTP headers that protect its visitors, with an A–F grade and how to fix each one.

B

Grade

Good, with minor improvements possible

https://www.cloudflare.com/ (200)

Results

  • Warning: The CSP allows 'unsafe-inline' scripts, which removes most of its protection against XSS. Use nonces or hashes instead.
  • Warning: The CSP allows 'unsafe-eval', so injected code can run through eval(). Remove it if your scripts do not need it.
  • Ok: HSTS is enabled for 365 days: browsers will only use HTTPS.
  • Ok: The page cannot be framed by other sites (protection against clickjacking).
  • Ok: X-Content-Type-Options: nosniff stops browsers from guessing file types.
  • Ok: Referrer-Policy limits what is sent to other sites.
  • Ok: Permissions-Policy limits the browser features the page can use.

Security headers

Strict-Transport-Security max-age=31536000; includeSubDomains
Content-Security-Policy default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.cloudflareinsights.com https://static-staging.cloudflareinsights.com https://challenges.cloudflare.com https://*.onetrust.com https://cdn.cookielaw.org https://ot.www.cloudflare.com https://www.googletagmanager.com https://tagmanager.google.com https://www.googleadservices.com https://googleads.g.doubleclick.net https://adservice.google.com https://cdn.bizible.com https://js.adsrvr.org https://*.marketo.net https://platform.twitter.com https://static.ads-twitter.com https://scripts.demandbase.com https://tag.demandbase.com https://*.6sc.co https://*.qualified.com https://snap.licdn.com https://bat.bing.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://*.google.com https://*.doubleclick.net https://www.googleadservices.com https://translate.googleapis.com https://cdn.bizible.com https://js.adsrvr.org https://*.marketo.net https://ads-twitter.com https://analytics.twitter.com https://*.twimg.com https://api.demandbase.com https://scripts.demandbase.com https://tag.demandbase.com https://tag-logger.demandbase.com https://api.company-target.com https://*.6sc.co https://epsilon.6sense.com https://*.qualified.com https://*.ads.linkedin.com https://www.linkedin.com https://bat.bing.com https: wss://*.qualified.com wss://*.registrar.cloudflare.com; frame-src https://*.adsrvr.org https://*.cloudflare.com https://*.videodelivery.net https://*.cloudflarestream.com https://www.googletagmanager.com https://*.qualified.com https://td.doubleclick.net https://bid.g.doubleclick.net https://9309168.fls.doubleclick.net https://9973066.fls.doubleclick.net https://s.company-target.com; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; worker-src 'self' blob:; child-src 'self' blob:; upgrade-insecure-requests
X-Frame-Options SAMEORIGIN
X-Content-Type-Options nosniff
Referrer-Policy strict-origin-when-cross-origin
Permissions-Policy geolocation=(), camera=(), microphone=()
All response headers (29)
DateMon, 23 Nov 2026 01:21:24 GMT
Content-Typetext/html; charset=utf-8
Transfer-Encodingchunked
Connectionclose
Link<https://www.cloudflare.com/.well-known/api-catalog>; rel="api-catalog", <https://www.cloudflare.com/.well-known/agents.json>; rel="service-desc", <https://www.cloudflare.com/.well-known/webmcp.json>; rel="service-desc", <https://www.cloudflare.com/openapi.json>; rel="service-desc", <https://www.cloudflare.com/llms.txt>; rel="service-doc", <https://www.cloudflare.com/sitemap.xml>; rel="sitemap", </fonts/Kunst%20Grotesk%20Regular.woff2>; rel=preload; as=font; type="font/woff2"; crossorigin, </fonts/Kunst%20Grotesk%20Medium.woff2>; rel=preload; as=font; type="font/woff2"; crossorigin, <https://ot.www.cloudflare.com>; rel=preconnect; crossorigin, <https://imagedelivery.net>; rel=preconnect; crossorigin, </static/hero-poster.avif>; rel=preload; as=image; type="image/avif"; fetchpriority=high
CF-Raya5ec5b619f444e30-CDG
CF-Cache-StatusHIT
Accept-Rangesbytes
Age2
Cache-Controlmax-age=10
Servercloudflare
Strict-Transport-Securitymax-age=31536000; includeSubDomains
Content-Security-Policydefault-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://static.cloudflareinsights.com https://static-staging.cloudflareinsights.com https://challenges.cloudflare.com https://*.onetrust.com https://cdn.cookielaw.org https://ot.www.cloudflare.com https://www.googletagmanager.com https://tagmanager.google.com https://www.googleadservices.com https://googleads.g.doubleclick.net https://adservice.google.com https://cdn.bizible.com https://js.adsrvr.org https://*.marketo.net https://platform.twitter.com https://static.ads-twitter.com https://scripts.demandbase.com https://tag.demandbase.com https://*.6sc.co https://*.qualified.com https://snap.licdn.com https://bat.bing.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https://*.googletagmanager.com https://*.google-analytics.com https://*.google.com https://*.doubleclick.net https://www.googleadservices.com https://translate.googleapis.com https://cdn.bizible.com https://js.adsrvr.org https://*.marketo.net https://ads-twitter.com https://analytics.twitter.com https://*.twimg.com https://api.demandbase.com https://scripts.demandbase.com https://tag.demandbase.com https://tag-logger.demandbase.com https://api.company-target.com https://*.6sc.co https://epsilon.6sense.com https://*.qualified.com https://*.ads.linkedin.com https://www.linkedin.com https://bat.bing.com https: wss://*.qualified.com wss://*.registrar.cloudflare.com; frame-src https://*.adsrvr.org https://*.cloudflare.com https://*.videodelivery.net https://*.cloudflarestream.com https://www.googletagmanager.com https://*.qualified.com https://td.doubleclick.net https://bid.g.doubleclick.net https://9309168.fls.doubleclick.net https://9973066.fls.doubleclick.net https://s.company-target.com; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; worker-src 'self' blob:; child-src 'self' blob:; upgrade-insecure-requests
Cross-Origin-Opener-Policyunsafe-none
Cross-Origin-Resource-Policycross-origin
Permissions-Policygeolocation=(), camera=(), microphone=()
Referrer-Policystrict-origin-when-cross-origin
X-Content-Type-Optionsnosniff
X-Frame-OptionsSAMEORIGIN
X-Served-Bymarketing-site
X-XSS-Protection1; mode=block
x-RMGW
Varyaccept-encoding
set-cookie__cf_bm=aySk3ZofHjhTABXajZ9.foHb9bgGCvHfLjdSS5PPFMY-1795396884.739311-1.0.1.1-a4Fgfjd97j7oWJnjxFfmVGiqP70vwjYvWr.7m3hIddWhR17SRNVPgr6ZPgOecnfGTdQ_7aKN.6r1jBnw6604AtyRY3cFAJLabiu29YFXr4ffFNDrWhnnUvMCxQoJ3z9LFGOnT02ETshQkS_4LvnsIw; HttpOnly; SameSite=None; Partitioned; Secure; Path=/; Domain=www.cloudflare.com; Expires=Mon, 23 Nov 2026 01:51:24 GMT
Server-TimingcfCacheStatus;desc="HIT"
Server-TimingcfEdge;dur=18,cfOrigin;dur=0,cfWorker;dur=4
Report-To{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=%2BsC%2FFMtxiI2rMmrVTflKaXyX%2FhWhs09DC9cVO9sEhyUDx89hhFs9Ng7d6a7KJPQ8G6GDWWlFSmNJqDQ44Ynjezd36CoQOBAR%2Bf1Fn068TsAXXS%2F2qMlSGT4iYA6zxuhvo2xjcQ%3D%3D"}]}
Nel{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
alt-svch3=":443"; ma=86400

Checked on 2026-11-23 01:21 UTC. Results are cached for 5 minutes.

What does the security headers check do?

It loads a page the way a browser does, follows its redirects, and reviews the HTTP headers that switch on browser protections. Each header gets a verdict, the site gets an A–F grade, and every problem comes with the line to add.

The headers we check

HeaderProtects againstRecommended value
Strict-Transport-SecurityDowngrade to HTTP and interception on public Wi-Fi.max-age=31536000; includeSubDomains
Content-Security-PolicyCross-site scripting (XSS) and injected content.Depends on the site; start with default-src 'self' in report-only mode.
X-Frame-OptionsClickjacking (your page inside an invisible frame).SAMEORIGIN, or frame-ancestors 'self' in the CSP.
X-Content-Type-OptionsFiles run as scripts because the browser guessed their type.nosniff
Referrer-PolicyLeaking full URLs (tokens, searches) to other sites.strict-origin-when-cross-origin
Permissions-PolicyAbuse of camera, microphone, location… by embedded code.camera=(), microphone=(), geolocation=()

We also flag headers that reveal software versions (Server: Apache/2.4.58, X-Powered-By) and cookies set without Secure, HttpOnly or SameSite.

How to add them

# Nginx (inside the server block for HTTPS)
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;

# Apache (.htaccess, needs mod_headers)
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"

Behind Cloudflare you can also set them with a Transform Rule (Rules → Transform Rules → Modify Response Header), and HSTS directly in SSL/TLS → Edge Certificates.

Before you enable HSTS

Once a browser has seen HSTS it refuses plain HTTP for that domain until max-age runs out. Make sure the site and, with includeSubDomains, every subdomain work over HTTPS with a valid certificate first. Check it with the SSL Checker, and the redirects with the Redirect Checker.

Frequently asked questions

What are security headers?

HTTP response headers that tell browsers to enable protections: use only HTTPS (HSTS), load scripts only from trusted places (CSP), refuse to be framed by other sites (X-Frame-Options), not guess file types (nosniff) and limit what is shared with other sites (Referrer-Policy).

How is the grade calculated?

Each missing or weak header takes points off 100, by importance: no HTTPS 60, no HSTS 25, no CSP 20, no clickjacking protection 15, nosniff and Referrer-Policy 10 each, smaller issues 5. 90 or more is an A, 75 a B, 60 a C, 40 a D.

How do I add these headers?

In your web server (Nginx add_header, Apache Header set), in your application, or at your CDN (Cloudflare Transform Rules, Netlify and Vercel config files). Add them on HTTPS responses, and test with this tool afterwards.

Why is a Content-Security-Policy hard?

It must list every place your pages load scripts, styles, fonts and frames from, including analytics and ads. Start with Content-Security-Policy-Report-Only to see what would break, fix the list, then enforce it.

Is X-XSS-Protection still needed?

No. Modern browsers removed the XSS filter it controlled, and enabling it could even cause problems. Use a Content-Security-Policy instead and leave X-XSS-Protection out (or set it to 0).

Does a good grade mean the site is secure?

No. Headers are one layer: they limit the damage of some attacks in the browser. The site still needs up-to-date software, a valid certificate (check it with the SSL Checker) and secure code.

Related tools

Last updated: