HSTS Checker
Check whether your domain has HSTS enabled, valid, and properly configured with a strong max-age and includeSubDomains.
Why HSTS matters
HTTP Strict Transport Security (HSTS) tells browsers to always connect to your domain over HTTPS — even if the user types
http:// or clicks an unencrypted link. Without it, any connection that starts as plain HTTP can be intercepted and downgraded by a man-in-the-middle attacker before the browser gets a chance to redirect.
Once a browser has seen a valid HSTS header it remembers the policy for max-age seconds. Every subsequent request skips the initial HTTP round-trip entirely, eliminating an entire class of SSL-stripping attacks.
The includeSubDomains directive extends this protection to every subdomain. Without it a subdomain running plain HTTP — even a forgotten staging environment — can be used as an entry point to steal cookies or redirect users.
Common HSTS issues
HSTS header missing
Your server never sends a
Strict-Transport-Security header. All traffic is vulnerable to SSL stripping until the user has visited the site at least once over a secure connection.
Fix: add Strict-Transport-Security: max-age=31536000; includeSubDomains to your server config.
Invalid header — no max-age
A header is sent but it does not contain a parseable
max-age directive. Browsers will ignore the policy entirely, providing no protection.
Fix: ensure max-age=<seconds> is present and contains a numeric value.
max-age too short
A
max-age below 15,552,000 seconds (180 days) is considered weak. Browsers forget the policy quickly, leaving short windows where downgrade attacks are possible.
Fix: set max-age to at least 15552000, ideally 31536000 (one year).
includeSubDomains missing
The main domain is protected but subdomains are not. An attacker can exploit any subdomain still accessible over HTTP — including forgotten staging or internal tooling — to bypass HTTPS enforcement on the parent domain.
Fix: add includeSubDomains once all subdomains are confirmed HTTPS-ready.
Monitor HSTS changes over time
A point-in-time check tells you where you stand today. But HSTS headers change — deployments silently drop the directive, max-age values get shortened by misconfigured CDNs, and includeSubDomains disappears after infrastructure changes.
DomainRisk.io tracks HSTS across every scan as part of a broader SSL and header analysis. Any regression — a header going missing, a max-age being reduced, includeSubDomains being removed — triggers an alert so you catch the change before attackers do.
Frequently asked questions
What is HSTS?
What is a good max-age value for HSTS?
What does includeSubDomains do?
What is HSTS preloading?
Does HSTS protect against all man-in-the-middle attacks?
Can I enable HSTS if some of my subdomains still use plain HTTP?
How often should I check my HSTS configuration?
Start continuous domain security monitoring
HSTS, DNS, SSL, WHOIS, email authentication and subdomains — monitored continuously with change alerts and an explainable risk score.