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.

D

Grade

Weak protection

https://wordpress.org/ (200)

Results

  • Warning: HSTS max-age is only 3600 seconds (0 days). Use at least 6 months, ideally one year (31536000).
  • Warning: No Content-Security-Policy. A CSP limits where scripts, styles and frames can load from, which stops most cross-site scripting (XSS). Start with a report-only policy and tighten it.
  • Warning: No "X-Content-Type-Options: nosniff". Browsers may guess file types and run an uploaded file as a script.
  • Warning: No Referrer-Policy. Add "Referrer-Policy: strict-origin-when-cross-origin" so full URLs (with tokens or search terms) are not sent to other sites.
  • Warning: No Permissions-Policy. It lets you turn off browser features the site does not use (camera, microphone, geolocation…), for example "Permissions-Policy: camera=(), microphone=(), geolocation=()".
  • Ok: The page cannot be framed by other sites (protection against clickjacking).

Security headers

Strict-Transport-Security max-age=3600
Content-Security-Policy Missing
X-Frame-Options SAMEORIGIN
X-Content-Type-Options Missing
Referrer-Policy Missing
Permissions-Policy Missing
All response headers (16)
Servernginx
DateMon, 23 Nov 2026 01:02:23 GMT
Content-Typetext/html; charset=UTF-8
Transfer-Encodingchunked
Connectionclose
VaryAccept-Encoding
Strict-Transport-Securitymax-age=3600
X-Olaf⛄
Varyaccept, content-type
Link<https://wordpress.org/wp-json/>; rel="https://api.w.org/"
Link<https://wordpress.org/wp-json/wp/v2/pages/457>; rel="alternate"; title="JSON"; type="application/json"
Link<https://w.org/>; rel=shortlink
X-Frame-OptionsSAMEORIGIN
Alt-Svcclear
X-RememberingEric Binnion <https://friendsofericbinnion.wordpress.com/>
X-ncHIT dca 1

Checked on 2026-11-23 01:02 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: