VisRank
Home
Free SEO CheckerSEO Audit ToolAEO CheckerAI Search AuditAI Citation AuditAI Visibility Monitoringllms.txt GeneratorRobots.txt TesterSecurity Headers CheckerLocal SEO AuditTrust & Entity AuditSchema CheckerAI Search Readiness CheckerWhy AI Does Not Mention MeCompare Your Site vs Competitor
FeaturesHow it worksFAQ
PricingBlogUpdatesContact
Free Scan

Free tool - no login

Security Headers Checker

Check which HTTP security headers any website sends: HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy, plus HTTPS redirects, mixed content and cookie flags.

Every result says what the header does and the exact value to add. It uses the same checks and score as the Security category of a full VisRank scan.

By Andrei Mironiuk, CEO, VisRank • Reviewed: November 26, 2026

Free, no login. Checks HTTPS, HSTS, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, mixed content, server leaks and cookie flags.

The headers

What are HTTP security headers?

HTTP security headers are instructions your server sends with every page that tell the browser how to protect visitors: use HTTPS only, which scripts may run, whether the page may be framed and how much data to share with other sites. They cost nothing to add and block whole classes of attacks.

HeaderWhat it doesRecommended value
Strict-Transport-SecurityTells browsers to use only HTTPS for your site for max-age seconds.max-age=31536000; includeSubDomains
Content-Security-PolicyLimits where scripts, styles and other resources may load from, which helps block cross-site scripting.Start with Report-Only: default-src 'self'; object-src 'none'; base-uri 'self'
X-Frame-Options / frame-ancestorsStops other sites loading your page in a frame (clickjacking). OWASP says CSP frame-ancestors obsoletes X-Frame-Options in supporting browsers.frame-ancestors 'self' (or X-Frame-Options: SAMEORIGIN)
X-Content-Type-OptionsStops browsers guessing (sniffing) file types.nosniff
Referrer-PolicyControls how much of your URL is sent to other sites when visitors click a link.strict-origin-when-cross-origin
Permissions-PolicySwitches off browser features you do not use, such as camera and microphone. MDN still labels it experimental.camera=(), microphone=(), geolocation=()
Server / X-Powered-ByCan reveal the software and version your site runs on.Remove X-Powered-By; keep Server free of version numbers
X-XSS-ProtectionDeprecated. MDN says it can create XSS issues in otherwise safe sites.Do not set it, or set 0

Values follow the OWASP HTTP Headers Cheat Sheet and MDN's HTTP headers reference, checked November 26, 2026. X-DNS-Prefetch-Control is non-standard according to MDN, so the checker treats it as optional.

How to check

How to check security headers

Check the headers on the final page after redirects, because that is what visitors receive. There are three quick ways:

  1. 1Use the checker above. It follows redirects, checks the final page and the http:// version, and explains every header.
  2. 2Open your browser DevTools. In Chrome or Firefox, open the Network tab, reload, select the first document request and read its Response Headers.
  3. 3Use curl on the command line. The command below makes a normal GET request and prints only the response headers.
curl -s -D - -o /dev/null https://example.com

curl -I sends a HEAD request instead, and some servers answer HEAD with different headers.

Headers are set per response. A CDN, a redirect, an error page or a separate shop or blog app can each send different headers, so check your homepage, key landing pages and login or checkout pages separately.

HSTS

What is HSTS? How to check the HSTS header

HTTP Strict Transport Security (HSTS) is the Strict-Transport-Security header. It tells browsers to load your site only over HTTPS for the number of seconds in max-age, so nobody can quietly downgrade a visitor to plain HTTP. To check it, run the URL through the checker above or look for Strict-Transport-Security in the response headers.

  • max-age is how long the browser remembers the rule. VisRank flags anything under 180 days; one year (31536000) is common.
  • includeSubDomains applies the rule to every subdomain, so make sure they all work over HTTPS first.
  • preload asks to be added to browsers' built-in list. MDN notes the list is not part of the HSTS specification.
  • Browsers ignore HSTS sent over plain HTTP. The http:// URL should redirect to https://, which the checker tests for you.

HSTS preload: when to use it

Rolling out for the first time? hstspreload.org suggests raising max-age in stages, from 5 minutes to a week and then a month, before you set the long-term value. It also warns that preload inclusion "cannot easily be undone." Source: MDN: Strict-Transport-Security.

CSP

What is a Content-Security-Policy (CSP) header?

A Content-Security-Policy header is a list of the sources a page may load scripts, styles, images, frames and other resources from. The browser blocks everything else, which, as MDN puts it, helps guard against cross-site scripting attacks.

  • default-src sets the fallback for every resource type; script-src overrides it for scripts.
  • frame-ancestors decides who may embed the page, and OWASP says it obsoletes X-Frame-Options in supporting browsers.
  • MDN says to avoid 'unsafe-inline' and 'unsafe-eval' because they defeat much of the purpose of a CSP. Use nonces or hashes for inline scripts instead.
  • Content-Security-Policy-Report-Only reports violations without blocking anything, so you can test a policy safely first.

Example

Content-Security-Policy example

A starting policy for a site that serves its own scripts and uses one analytics domain. Send it as report-only, fix what breaks, then switch the header name to Content-Security-Policy.

Content-Security-Policy-Report-Only:
  default-src 'self';
  script-src 'self' https://www.googletagmanager.com;
  img-src 'self' data: https:;
  style-src 'self';
  object-src 'none';
  base-uri 'self';
  frame-ancestors 'self'

Send it as one line; it is split here for reading. MDN notes that reports are only sent when the policy includes a report-to directive; without one, violations still show in the browser console. Sources: MDN: Content-Security-Policy and Content-Security-Policy-Report-Only.

Our data

Which security headers do real sites miss?

Most of them. On November 26, 2026 we checked the latest completed VisRank scan of 58websites, scanned between March and November 2026 and excluding VisRank's own site. Every site used HTTPS, but most skipped the headers that take one line each.

Header or checkSites failing (of 58)
Permissions-Policy43
Referrer-Policy41
Content-Security-Policy37
X-Frame-Options / frame-ancestors29
X-Content-Type-Options28
HSTS (missing or under 180 days)23
Mixed content on HTTPS pages9
HTTPS0

About this data: a small, self-selected sample of sites people chose to scan, counted across the pages each scan covered. We publish totals only and never name the websites or the people who scanned them.

Fix it

How to add security headers on Nginx, Apache, Next.js and Cloudflare

Add them where every response passes through: the web server, the CDN or the framework config. Plugins only cover pages the CMS renders. Start the Content-Security-Policy in report-only mode, because an enforced policy that misses a script will break that part of the site.

Nginx

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" 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;
add_header Content-Security-Policy-Report-Only "default-src 'self'; frame-ancestors 'self'" always;

Apache (.htaccess or vhost)

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
Header always set Content-Security-Policy-Report-Only "default-src 'self'; frame-ancestors 'self'"

Next.js (next.config)

async headers() {
  return [{
    source: '/(.*)',
    headers: [
      { key: 'Strict-Transport-Security', value: 'max-age=31536000; includeSubDomains' },
      { key: 'X-Content-Type-Options', value: 'nosniff' },
      { key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
      { key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
    ],
  }];
}

On Cloudflare, turn on HSTS under SSL/TLS, then Edge Certificates, and add the other headers with a Transform Rule that modifies response headers (see Cloudflare's HSTS guide). On WordPress, set headers at the host or CDN when you can; our WordPress security headers guide covers the plugin route and its limits.

SEO

Do security headers affect SEO?

Not directly. Google's page experience documentation asks whether pages are served securely over HTTPS, but says aspects beyond Core Web Vitals "don't directly help your website rank higher in search results." It names no security headers.

Headers still matter to the business. They protect visitors and checkout forms, they show up in security reviews that agencies and larger buyers run, and a careless Content-Security-Policy can break analytics or embeds. Fix them for safety and trust, not for rankings.

Security headers checker FAQ

Which security headers should every website have?

HTTPS with Strict-Transport-Security, a Content-Security-Policy, X-Frame-Options or CSP frame-ancestors, X-Content-Type-Options: nosniff, Referrer-Policy and Permissions-Policy. The OWASP HTTP Headers Cheat Sheet lists a recommended value for each.

What does "Content-Security-Policy header not set" mean?

It means the page is served without a Content-Security-Policy, so the browser has no list of allowed script and resource sources. Security scanners report it as a missing protection against cross-site scripting. Add a policy in report-only mode first, check the reports, then enforce it.

What does X-Content-Type-Options: nosniff do?

It tells the browser to trust the Content-Type your server declares instead of guessing the file type. MDN says browsers then block script and style responses whose MIME type does not match, which stops a file uploaded as an image being run as a script.

What is the Permissions-Policy header?

Permissions-Policy lets a site switch browser features such as the camera, microphone and geolocation on or off for itself and for embedded frames. An empty list, for example camera=(), disables the feature everywhere. MDN still labels the header experimental, and it does not work in every major browser.

Is the X-XSS-Protection header still needed?

No. MDN marks X-XSS-Protection as deprecated and warns it can create XSS vulnerabilities in some cases. OWASP recommends not setting it or setting it to 0, and using a Content-Security-Policy instead.

How do I enable HSTS on Cloudflare?

In the Cloudflare dashboard, go to SSL/TLS, then Edge Certificates, and enable HTTP Strict Transport Security (HSTS). Choose a max-age and decide whether to include subdomains. Make sure HTTPS works everywhere first, because Cloudflare warns that visitors are locked out if HTTPS stops working before max-age expires.

Should I submit my site to the HSTS preload list?

Only if every subdomain will stay on HTTPS for good. hstspreload.org warns that inclusion cannot easily be undone and that removal takes months to reach users. Most sites are well served by HSTS with a one-year max-age and no preload.

Headers are one part of the picture

A full VisRank scan runs all 49 checks across SEO, AI search readiness, security and local signals. The $10 Full Report adds fix steps for every issue.

Run a free full scan

Related pages

WordPress Security Headers Robots.txt Tester Schema Checker For Agencies For Developers Methodology
VisRank

Free website visibility audits. Check SEO, AI readiness, security & local presence in 30 seconds.

VisRankTM is the official SEO and AI readiness audit tool available at visrank.org.

general@visrank.org

Tools

  • Free SEO Checker
  • SEO Audit Tool
  • AEO Checker
  • AI Search Audit
  • AI Citation Audit
  • AI Visibility Monitoring
  • llms.txt Generator
  • Robots.txt Tester
  • Security Headers Checker
  • Local SEO Audit
  • Trust & Entity Audit
  • Schema Checker
  • AI Search Readiness Checker
  • Why AI Does Not Mention Me
  • Compare Your Site vs Competitor
  • WordPress SEO Audit
  • Shopify SEO Audit

Solutions

  • For Agencies
  • For Local Businesses
  • For Ecommerce
  • For SaaS
  • For Developers
  • For New Businesses

Resources

  • Blog
  • Case Studies
  • Examples
  • Sample SEO Report
  • Updates
  • FAQ
  • Pricing

Company

  • About
  • Methodology
  • Features
  • Comparisons
  • Contact
  • Crawler
  • Privacy Policy
  • Terms of Service
VisRank

(c) 2026 VisRank. All rights reserved. Auckland, New Zealand.

PrivacyTermsMethodology