What is HSTS?
HSTS (HTTP Strict Transport Security) is a security policy that tells browsers to always connect to a website using HTTPS and never fall back to HTTP.
HSTS & HTTPS security
Clear, risk-aware explanations of HTTP Strict Transport Security, browser enforcement, preload behaviour, certificate failures, and best-practice guidance.
HSTS (HTTP Strict Transport Security) is a security policy that tells browsers to always connect to a website using HTTPS and never fall back to HTTP.
When a browser receives an HSTS header, it stores the policy locally and automatically upgrades all future requests to HTTPS for the duration specified by the max-age directive.
No. HSTS checks are read-only inspections of HTTP response headers and do not modify server configuration or browser state.
Once HSTS is stored, browsers refuse to load the site over HTTP and block access entirely if HTTPS fails, even if the user attempts to bypass warnings.
The max-age directive defines how long a browser should enforce HTTPS-only access for a domain, measured in seconds.
includeSubDomains applies the HSTS policy to all subdomains, meaning every subdomain must support valid HTTPS for the entire duration.
HSTS preload is a browser-maintained list that hardcodes HTTPS enforcement directly into browser source code before any network request is made.
Once preloaded, HTTPS enforcement cannot be bypassed and removal requires approval from browser vendors, often taking months.
Browsers will block access entirely until a valid certificate is deployed. Users cannot bypass warnings or proceed at their own risk.
Yes. Any HTTPS misconfiguration, certificate expiry, or trust failure can result in complete site unavailability for all users.
No. HSTS remains active in browsers until the max-age expires, and preload removal can take weeks or months.
Yes. HSTS should be tested with low max-age values in staging environments before being deployed to production.
Browsers remember HSTS policies, which can cause localhost or development domains to be forced to HTTPS unexpectedly.
No. HSTS applies only to web traffic and does not impact SMTP, IMAP, or POP email delivery.
HSTS prevents SSL stripping attacks, downgrade attacks, and accidental insecure connections over HTTP.
HSTS is best suited for organisations with automated certificate renewal, strong monitoring, and full control over DNS and hosting.
Small sites, personal projects, or environments without monitoring and automated renewal should avoid preload entirely.
Best practices include gradual rollout, short initial max-age values, avoiding preload prematurely, and continuous certificate monitoring.
No. HSTS checks are performed live and no domains, headers, or results are stored or logged.
Want to try it yourself? Run the HSTS checker or Check SSL certificate health or Inspect DNS configuration
Ready to inspect HSTS status?