← Back to the security guide
HTTP Security HeadersHigh risk

Missing Strict-Transport-Security (HSTS) header

What does this mean?

Without this header (HSTS), a visitor's first connection to your site could be silently downgraded from HTTPS to plain HTTP, exposing anything they submit — passwords, payment details — to interception.

What are the potential impacts?

  • A visitor on public wifi — a coffee shop, airport, or hotel — can be silently downgraded to an unencrypted connection by anyone else on that network, exposing anything they type.
  • This is exactly the setup used in "man-in-the-middle" attacks, where an attacker intercepts a login or payment form and captures the data before it ever reaches your real server.
  • Even a single unprotected first visit is enough — HSTS exists specifically to close that gap, and its absence is invisible to visitors until it's exploited.
  • For an e-commerce or SaaS site, this can mean stolen customer credentials or payment details, with the liability and cleanup cost falling on you, not the attacker.

How to fix it

Add Strict-Transport-Security: max-age=31536000; includeSubDomains to your server configuration. Many hosts and CDNs (Cloudflare, for example) have a one-click toggle for this in their dashboard.

Want to see whether this actually affects your site? Run a free scan — no signup required.

Run a free scan