LaunchRanked

Security headers checker

Enter a URL. We read the response headers and grade the six that matter most, with a one-line fix for each gap.

The six headers we grade

  • Strict-Transport-Security (HSTS). Tells browsers to use HTTPS for your domain for max-age seconds, even if someone types http://. Aim for one year (31536000) once HTTPS works everywhere.
  • Content-Security-Policy (CSP). Lists where scripts, styles, images and frames may load from. It’s the main defence if someone manages to inject a script. A policy that allows 'unsafe-inline' scripts gets partial credit, since inline injection still works.
  • X-Content-Type-Options: nosniff. Stops browsers guessing a file’s type, so an uploaded text file can’t be run as a script. One value, no downside.
  • Frame protection. CSP frame-ancestors (or the older X-Frame-Options) controls who can load your pages in a frame, which blocks clickjacking. If both are set, modern browsers use frame-ancestors.
  • Referrer-Policy. Controls how much of your URL is sent to other sites when someone clicks a link. strict-origin-when-cross-origin sends only your domain to other sites and is the default in current browsers; setting it explicitly removes doubt.
  • Permissions-Policy. Switches off browser features you don’t use, such as the camera, microphone and geolocation, for your pages and any third-party scripts on them.

We also test whether http:// redirects to https://, and note deprecated or leaky headers like X-XSS-Protection or a Server header that reveals a version number.

Where to set them

Headers are set by whatever serves your pages: next.config.js headers or middleware in Next.js, a _headers file on Cloudflare Pages or Netlify, vercel.json on Vercel, or your nginx config. Add them in one place so every response gets them, including error pages.

Read the grade as a to-do list

The grade is a simple weighted checklist of the headers, not a security audit. A site can score A and still have a vulnerable plugin. Use it to catch missing basics, then fix things in order of the points missing. After a change, re-run the check and confirm redirects with the redirect checker.

Questions

Do security headers affect SEO?

Not directly. HTTPS is a lightweight ranking signal, but headers like CSP or Referrer-Policy aren't. They matter because a hacked site, injected spam links or a malware warning in Chrome will hurt traffic far more than any tag you tune.

How is the grade calculated?

Out of 100: HSTS and Content-Security-Policy are worth 25 each, X-Content-Type-Options and frame protection 15 each, Referrer-Policy and Permissions-Policy 10 each. Weak settings, like a CSP that allows 'unsafe-inline' scripts, get partial points. A is 90 or more, F is under 40.

Can adding a Content-Security-Policy break my site?

Yes, a strict CSP blocks any script, style or frame you didn't list. Start with Content-Security-Policy-Report-Only, which only reports violations, fix what it reports, then switch to the enforcing header.

Should I submit my site to the HSTS preload list?

Only when every subdomain serves HTTPS and you're sure you'll never need plain HTTP again. The list requires max-age of at least one year, includeSubDomains and preload, and removal takes months to reach browsers.

Free launch

Launching something? Get a page that ranks.

Launch free on LaunchRanked: a permanent, SEO-ready product page, a weekly leaderboard slot and a followed link after human review. No badge required.

Related free tools

See all free tools