HSTS is an HTTP response header that tells browsers to only connect to your domain over HTTPS. Once a browser receives a valid HSTS header, it will refuse to make any plaintext HTTP connections to that domain for the specified duration.
When a browser receives a response containing the Strict-Transport-Security header over a valid HTTPS connection, it stores the directive and applies it to all future requests. Any attempt to load the site over HTTP will be internally redirected to HTTPS before the request ever leaves the browser. This prevents SSL stripping attacks, where an attacker intercepts the initial HTTP request and downgrades the connection.
The header is only honored when delivered over HTTPS. Browsers ignore it on plaintext HTTP responses because an attacker could have injected or modified the header.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Even with HSTS, the very first visit to a domain is vulnerable because the browser has not yet received the header. The HSTS preload list solves this by hardcoding HSTS-enabled domains directly into the browser. Once your domain is on the preload list, browsers enforce HTTPS from the first connection, with no trust-on-first-use gap.
Requirements for preload list submission:
max-age to at least 31536000 (one year).includeSubDomains directive.preload directive.Preloading is difficult to reverse. Removal from the preload list can take months and requires a new browser release to reach users. Do not preload if:
includeSubDomains is required, every subdomain (including internal ones) must support HTTPS before preloading.includeSubDomains while some subdomains still run on HTTP, those subdomains will become unreachable in browsers.Check whether a domain sends the HSTS header and inspect its directives.
Check HSTS headers for your domain