CyberGlossary

Network Security

HTTP Strict Transport Security (HSTS)

Also known as: Strict-Transport-Security, HSTS header

Definition

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, it remembers the policy 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 and cookie-injection attacks on initial requests. Best practice combines a long max-age, the includeSubDomains directive, the preload directive, and submitting the domain to the browser HSTS preload list so the first visit is also protected.

Examples

  • Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  • A bank submitting its apex domain to the Chromium HSTS preload list.

Related terms