HTTP Strict Transport Security (HSTS) is a response header that forces browsers to use HTTPS for a domain, defeating SSL-stripping attacks that downgrade users to plaintext. The header is easy to get subtly wrong — too short a max-age, a missing includeSubDomains, or a preload directive that was never actually submitted. This checker parses your header, scores it against current best practice, and tells you exactly what to fix.
How it works
A typical HSTS header looks like:
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
The tool parses the three components and applies the recommended rules:
- max-age — must be present and at least
31536000(one year). Shorter values are flagged; missing values mean no policy. - includeSubDomains — recommended, and required for the preload list. Flagged if absent.
- preload — the directive is a request to be added to browsers’ built-in list, but it only takes effect after submission at
hstspreload.org. Preload requires bothincludeSubDomainsand a one-year-plusmax-age.
Each rule contributes to a simple compliance score, and the tool lists the specific changes needed to reach full preload eligibility.
Tips and notes
- Roll out HSTS gradually: start with a short
max-age, confirm nothing breaks, then raise it to a year or more before enabling preload. - Do not add
preloadorincludeSubDomainsuntil every subdomain serves HTTPS — preload is hard to reverse and browsers cache it for the fullmax-age. - Serve the header only over HTTPS; browsers ignore HSTS received over plain HTTP.
- After meeting the criteria, submit the domain at hstspreload.org to actually get listed — the directive alone does nothing.