What is HSTS (HTTP Strict Transport Security)?

HSTS is a security header that tells browsers to always use HTTPS for a site, preventing downgrade attacks and insecure first requests.

Free · no signup · passive checks only · results in under a minute

HTTP Strict Transport Security (HSTS) is a response header that tells browsers to connect to your site only over HTTPS for a set period. After the first visit, the browser upgrades any http:// link itself, before a request is sent.

Example

Strict-Transport-Security: max-age=31536000; includeSubDomains
  • max-age is how long, in seconds, the browser remembers the rule. Six months or more is recommended.
  • includeSubDomains applies the rule to every subdomain, so make sure they all support HTTPS.
  • preload asks to be included in browsers' built-in HSTS lists. Removal takes months, so add it only when you are sure.