Strict-Transport-Security — HTTPS only, remembered
FlagStrict-Transport-Security: max-age=63072000; includeSubDomains; preload
Tells the browser to use only HTTPS for this host for max-age seconds (here two years), so a
typed http:// link or a downgrade attempt never goes out in plain text.
- Only counts over HTTPS. Browsers ignore it on an
http://response, so an attacker in the middle can't add or shorten it. - First-visit gap. It takes effect after one secure response. The very first
http://request is still exposed. preloadcloses that gap. Browsers ship a list of HSTS hosts (hstspreload.org). Listing requiresmax-ageof at least31536000(one year),includeSubDomainsandpreload.includeSubDomainscovers every subdomain. OWASP warns that a misconfigured header or a certificate problem can leave users unable to reach the site untilmax-ageruns out: check that no subdomain still needs plain HTTP first.