Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 556

HTTP Strict Transport Security (HSTS)

Reviewed byCybersecurity entrepreneur & security researcher

What is HTTP Strict Transport Security (HSTS)?

HTTP Strict Transport Security (HSTS)A web security policy delivered via an HTTP response header that tells browsers to access a domain only over HTTPS for a declared period of time.


HSTS, defined in RFC 6797, is signalled by the Strict-Transport-Security response header. Once a compliant browser receives this header over HTTPS, it remembers the policy for the declared max-age and automatically upgrades any future request to that host (and optionally its subdomains) to HTTPS, refusing to connect if the TLS handshake or certificate validation fails. This neutralises SSL-stripping attacks (Moxie Marlinspike's 2009 sslstrip) and cookie injection over plaintext.

HSTS has one structural weakness: trust-on-first-use. Before a browser has ever seen the header, the very first request can still be intercepted and downgraded. The preload list — a hard-coded set compiled into Chromium, Firefox, Safari and Edge — closes that gap by shipping the policy with the browser, so even the first visit is forced to HTTPS. Submission requires max-age of at least 31536000 (one year), includeSubDomains, and the preload directive, via hstspreload.org. Google Registry preloaded entire gTLDs such as .dev and .app, meaning every domain under them is HTTPS-only by default. Caveat: removal from the preload list propagates slowly, so preload only when you can commit to HTTPS-everywhere long term.

flowchart TD
  A[Browser first visit] -->|no policy yet| B{On preload list?}
  B -->|yes| C[Force HTTPS immediately]
  B -->|no| D[Plaintext request possible - TOFU risk]
  D --> E[Server sends Strict-Transport-Security header]
  E --> F[Browser caches policy for max-age]
  F --> G[All future requests auto-upgraded to HTTPS]
  G -->|invalid cert| H[Hard-fail, no click-through]

Examples

  1. 01

    Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

  2. 02

    A bank submitting its apex domain to the Chromium HSTS preload list.

Frequently asked questions

What is HTTP Strict Transport Security (HSTS)?

A web security policy delivered via an HTTP response header that tells browsers to access a domain only over HTTPS for a declared period of time. It belongs to the Network Security category of cybersecurity.

What does HTTP Strict Transport Security (HSTS) mean?

A web security policy delivered via an HTTP response header that tells browsers to access a domain only over HTTPS for a declared period of time.

How do you defend against HTTP Strict Transport Security (HSTS)?

Defences for HTTP Strict Transport Security (HSTS) typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for HTTP Strict Transport Security (HSTS)?

Common alternative names include: Strict-Transport-Security, HSTS header.

Related terms

See also