HSTS Header Checker

Enter an HTTPS URL to see its Strict-Transport-Security header, max-age in seconds, and whether includeSubDomains and preload are set.

HSTS Header Checker

Enter an HTTPS URL to see its Strict-Transport-Security header, max-age in seconds, and whether includeSubDomains and preload are set.

Enter a valid value or use one of the quick examples above.
Live analysis is enabled where server-side checks are available. A few tools still fall back to readiness mode when they need external network services or third-party APIs.

What this HSTS checker tells you

HTTP Strict Transport Security (HSTS) is a response header, Strict-Transport-Security, that tells a browser to use only HTTPS for your domain for a set period. After a browser has seen the header once over a valid HTTPS connection, it rewrites any later http:// link or typed address to https:// before a request leaves the device. That closes the gap an SSL-stripping attacker would use on public Wi-Fi, and it removes the extra plain-HTTP round trip your redirect would otherwise cost. The mechanism is defined in RFC 6797, and MDN's reference covers browser behavior.

This tool requests the exact URL you enter from our server and reads the response headers. It reports four things: whether the header is present (HSTS Found or Missing), the Max Age in seconds, whether Include Subdomains is set, and whether Preload is set. It also shows the raw header value so you can copy it into a ticket or compare it with your server config.

Use it after you enable HTTPS on a new site, after moving to a new host, CDN or reverse proxy (headers are often lost in these moves), before you submit a domain to the browser preload list, or when a security scan or client audit flags "HSTS missing".

How to check a site

  1. Type the full address in the URL box, including https:// (for example https://www.yoursite.com). The tool rejects input without http:// or https://. You can also click one of the example chips (example.com, google.com, github.com) to see a sample result.
  2. Click Check HSTS.
  3. Read the status badge next to the URL, then the three metric cards and the raw Strict-Transport-Security line underneath.
  4. If you changed your server config, test both your bare domain (https://yoursite.com) and your www host, because they can be served by different rules.

Worked example: three results and what they mean

Here are real results from the tool for three inputs:

URL enteredStatusMax AgeInclude SubdomainsPreload
https://github.comHSTS Found31536000sYesYes
http://github.comMissing0sNoNo
https://google.comMissing0sNoNo

GitHub over HTTPS returns max-age=31536000; includeSubdomains; preload. 31,536,000 seconds is exactly 365 days, so a browser that visits once will refuse plain HTTP for github.com and every subdomain for a year, and the preload flag shows GitHub has opted into browser preload lists.

GitHub over HTTP shows "Missing", and that is correct, not a fault. The HTTP response is only a redirect (a Location: https://github.com/ header and no body). RFC 6797 says browsers must ignore an HSTS header received over plain HTTP, so servers should send it on HTTPS responses only. Always test the https:// address.

google.com also shows "Missing", because the HTTPS response for the bare domain is a redirect to https://www.google.com/, and that particular redirect carries no HSTS header. The tool does not follow redirects; it reports the headers of the first response only. That is useful: if your bare domain redirects to www without an HSTS header, the preload list will reject the domain (see below). To see the policy of the final page, enter the final URL directly.

How to read the result

Max Age

max-age valueEqualsWhat it usually means
0-Tells browsers to delete any stored HSTS policy. Only use it to roll back.
3005 minutesFirst test stage. Safe to try, gives almost no protection.
6048007 daysSecond test stage.
259200030 daysThird test stage.
31536000365 daysThe minimum the preload list accepts. A sensible production value.
63072000730 daysTwo years, the value shown in hstspreload.org's own example.

The staged values come from the deployment advice at hstspreload.org: raise max-age step by step, check for broken pages at each step, and wait out the full max-age before moving on. Note that this tool shows "HSTS Found" for any header it finds, including max-age=0, so always look at the number, not just the green badge.

Include Subdomains

"Yes" means the policy also covers every subdomain (shop., mail., dev. and so on). This is stronger, but it will lock users out of any subdomain that still serves plain HTTP or has an invalid certificate, including internal hosts reachable only on your office network. Audit your DNS records before you turn it on. The directive name is case-insensitive, so includeSubdomains (as GitHub writes it) counts.

Preload

"Yes" only means the preload word is in the header. It does not mean the domain is on the preload list that Chrome, Firefox, Safari and Edge ship with. This tool does not query that list; check the status of your domain at hstspreload.org. To be accepted, the list currently requires a valid certificate, an HTTP to HTTPS redirect on the same host if you listen on port 80, HTTPS on all subdomains, and a header on the base domain with max-age of at least 31536000 plus includeSubDomains and preload. Any extra redirect on the HTTPS site must carry the header too. Removal from the list takes a long time to reach users, so only submit a domain you are sure will stay HTTPS-only.

Limits of this check

  • One URL, one response. The tool does not crawl your site or follow redirects. A header set only on your home page template may be missing on other paths, file downloads or API endpoints, so test a few important URLs.
  • Server-side request. The request comes from our server, not your browser, so it cannot see your browser's stored HSTS state. To inspect that in Chrome, open chrome://net-internals/#hsts and query your domain.
  • No syntax validation. The tool reads max-age with a simple number match and checks for the two directive names. It does not flag duplicate headers, typos such as max_age, or a header sent twice with different values. Look at the raw line if anything seems off.
  • Public sites only. Staging servers behind a VPN, IP allow list or basic auth cannot be reached.

Fixing a missing or weak header

Add the header on HTTPS responses only. Typical one-line configs (start with a short max-age and raise it later):

  • Nginx, inside the server block that listens on 443: add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
  • Apache with mod_headers, inside the HTTPS virtual host: Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
  • Cloudflare and most managed hosts offer an HSTS switch in their SSL/TLS settings, so you may not need to edit server files at all.

Reload the server, then run this check again.

This tool vs. other ways to check

You can get the same raw answer from a terminal with curl -sI https://yoursite.com | grep -i strict, or from the Network tab in browser developer tools. This page saves those steps and splits the directives out for you. If you want the whole picture rather than one header, the Security Headers Scanner scores HSTS alongside Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy, the HTTP Headers Checker lists every header a URL returns, and the Redirect Checker traces the path from your HTTP address to the final HTTPS page, so you can see which hop needs the header.

Frequently Asked Questions

For production, at least 31536000 seconds (one year), which is also the minimum the HSTS preload list accepts. When first enabling it, hstspreload.org recommends stepping up through 300 (5 minutes), 604800 (1 week) and 2592000 (30 days), checking for broken pages at each stage.

Browsers ignore a Strict-Transport-Security header received over plain HTTP (RFC 6797), so servers normally send it only on HTTPS responses. Your HTTP address should just redirect to HTTPS. Test the https:// URL instead.

The tool reads only the first response and does not follow redirects. If the URL you entered redirects (for example from the bare domain to www), it shows that redirect's headers. Enter the final URL, and consider adding the header to the redirect too.

No. It only means the preload directive appears in the header. Check your domain's actual list status at hstspreload.org, which also lists the submission requirements.

Serve the header with max-age=0 over HTTPS. Each browser drops the stored policy the next time it visits your site over HTTPS. Browsers that never return keep the old policy until it expires, which is why you should start with a short max-age.