What is an HSTS Checker?
Without HSTS, a visitor who types your domain or follows an old http:// link makes one plain-HTTP request before your redirect moves them to HTTPS, and that request can be intercepted. The Strict-Transport-Security header tells the browser to skip plain HTTP for your domain for a set time.
This checker requests the URL from our server and shows the header exactly as sent, then breaks it down: max-age in seconds and as a duration, whether includeSubDomains and the preload token are present, and whether the domain is on the browser preload list, looked up live at hstspreload.org.
It reads the response you point it at and does not follow redirects, because for preloading the header has to be on the redirect from the bare domain as well as on the final page. When the URL redirects, the result says where to, so you can check that URL too.
How to check HSTS by hand
The checker does this for you, but each of these shows the same header from your own machine:
- curl: run curl -sI https://example.com | grep -i strict-transport-security. No output means no header on that response. Check the bare domain and the www host separately.
- Chrome DevTools: open the Network tab, reload the page, select the first (document) request and read Response Headers for strict-transport-security.
- chrome://net-internals/#hsts: under Query HSTS/PKP domain, enter the domain. A static entry means it is on the preload list built into Chrome; a dynamic entry means Chrome saw the header on a visit. Delete domain security policies removes a dynamic entry so you can test again, but cannot remove a preloaded one.
- hstspreload.org: enter the domain to see whether it is preloaded, pending or eligible, and what stops it qualifying.
max-age, includeSubDomains and preload
max-age is how many seconds the browser remembers to use HTTPS only, counted again from every response that carries the header. max-age=0 tells the browser to forget the domain, which is how HSTS is switched off.
includeSubDomains extends the rule to every subdomain, including ones you have forgotten about. preload is not an instruction to the browser: it is your consent for the domain to be added to the list that browsers ship with, so that even the first visit skips plain HTTP.
| max-age | Duration | Typical use |
|---|---|---|
| 300 | 5 minutes | First test after enabling HSTS |
| 604800 | 1 week | Second step of a gradual rollout |
| 2592000 | 30 days | Third step, once nothing has broken |
| 15768000 | 182.5 days (6 months) | Working minimum for a live site |
| 31536000 | 1 year | Standard value, and the minimum for preloading |
| 63072000 | 2 years | Value hstspreload.org recommends |
Real headers, and what the checker found
| URL | Strict-Transport-Security | Preload list |
|---|---|---|
| https://github.com | max-age=31536000; includeSubdomains; preload (1 year) | Preloaded |
| https://www.wikipedia.org | max-age=106384710; includeSubDomains; preload (3.37 years) | Preloaded, via wikipedia.org |
| https://www.bitssolved.com | max-age=31536000; includeSubDomains (1 year) | Not on the list |
| https://example.com | No header | Not on the list |
The risks of preloading too early
Preloading is the strongest form of HSTS and the hardest to undo. Once a domain is in a browser release, removing it means another submission and another release cycle, and visitors on older browser versions keep the entry until they update.
With includeSubDomains, every subdomain must serve valid HTTPS for as long as the entry exists. The ones that break are the ones nobody remembers: an intranet host, an old webmail address, a mail tracking domain, a vendor CNAME without a certificate, a printer or router admin page. They stop loading over HTTP, and there is no override for visitors.
The safe order is to start with a short max-age without includeSubDomains, raise it a step at a time while watching for anything that breaks, add includeSubDomains once every subdomain is on HTTPS, run at one year for a while, and only then add preload and submit.
Common errors and edge cases
- Sent over plain HTTP: browsers ignore Strict-Transport-Security on an http:// response. It only counts over HTTPS.
- Missing on the redirect: the bare domain often answers with a 301 to www and no header. Preloading requires the header on that redirect too, and checking only the www host will not show the gap.
- Sent twice: a CDN and the origin both add the header, and the two values disagree. Browsers use only the first. The checker flags this.
- Only on some pages: the header has to be on every HTTPS response, including errors and redirects, or a visitor who lands on one of those first gets no protection.
- A typo such as max_age=31536000 or a missing semicolon makes the browser ignore the whole header.
Further reading
Frequently asked questions
How do I check if HSTS is enabled?
Enter the HTTPS URL above. By hand, run curl -sI https://example.com and look for a strict-transport-security line, or open Chrome DevTools, Network tab, reload, select the page request and read its Response Headers.
How do I check HSTS in Chrome?
Open chrome://net-internals/#hsts and use Query HSTS/PKP domain. A static entry means the domain is preloaded; a dynamic entry means Chrome saw the header on a visit. The same page can delete a dynamic entry while you test.
What max-age should I set?
One year (31536000) is the standard and the minimum for the preload list. Ramp up to it: a few minutes, then a week, then a month, while you confirm nothing breaks.
What does preload mean?
Browsers ship a built-in list of HSTS domains, which protects even the first visit. To qualify, send max-age of at least one year, includeSubDomains and the preload token on the bare domain, then submit it at hstspreload.org.
Any risk in enabling it?
Only if some subdomain still needs plain HTTP: includeSubDomains will make it unreachable over HTTP. Preloading is slow to undo, so audit subdomains first.
Does HSTS replace the HTTP to HTTPS redirect?
No. Keep the redirect for first contact; HSTS protects every visit after it, and the preload list covers the first one too.