Security
SecurityHigh

HSTS Header

Checks for Strict-Transport-Security header — blocks HTTPS downgrade attacks.

What this check measures

We read the `Strict-Transport-Security` HTTP response header. Must have max-age ≥ 1 year (31536000 seconds) and ideally includeSubDomains and preload.

Why it matters

HSTS tells browsers: never connect to this domain over HTTP, ever. Blocks downgrade attacks on hostile networks (airport wifi, corporate proxies). Once a browser sees HSTS, users are safe for the max-age duration.

search

How our audit detects it

Parse response headers for Strict-Transport-Security. Validate max-age value and presence of includeSubDomains + preload directives.

Typical findings

  • error_outlineNo HSTS header at all — HTTPS works but downgrade still possible.
  • error_outlinemax-age=300 (5 minutes) — short max-age defeats the purpose.
  • error_outlineNo includeSubDomains — subdomains still vulnerable.

How to fix

Add `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`. Submit domain at hstspreload.org once all subdomains serve HTTPS. Takes effect on first visit.

Copy-paste fix prompt for your stack

Lovable · Cursor · Bolt · v0 · Replit · Windsurf · Claude Code · Base44

View the fix prompt →

Frequently asked questions

Can HSTS lock me out?expand_more
Yes — if HTTPS breaks, users who saw HSTS cannot fall back to HTTP. Keep certs auto-renewing.

Want this checked on your site?

Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.

Scan my site

Related checks