Free HSTS Checker for Your Strict-Transport-Security Header
Paste your header to check it against RFC 6797, see what each max-age, includeSubDomains and preload combination does over time, and copy the exact header. It runs in your browser.
Last updated 15 November 2026
HSTS, short for HTTP Strict Transport Security, is the response header that tells a browser to use HTTPS for your site on later visits. This HSTS checker reads a Strict-Transport-Security header you paste, as a bare value, one header line or a block of response headers, and checks it against the rules in RFC 6797: max-age is required and holds whole seconds, each directive appears once, and includeSubDomains takes no value. You can then change max-age, includeSubDomains and preload and follow a timeline of what a browser does with each combination, see which of your listed subdomains it covers, and copy the exact header. Before its preload checklist, the tool sets out what hstspreload.org says preloading commits a domain to. It never fetches your site, so it cannot confirm that the header is sent, on which responses, or that your HTTP redirect exists.
How to use this tool
- 1
Paste and check your header
Paste the Strict-Transport-Security value, the whole header line or every response header from your browser's developer tools, up to 2,000 characters, and press Check header. A header that follows RFC 6797 becomes the starting point for the next step, unless its max-age has more than 10 digits, which the builder's box does not take.
- 2
Try a combination
Type max-age in seconds or pick a ramp-up value, and switch includeSubDomains and preload on or off. preload starts off. The timeline shows what a browser does with that combination, from before its first visit to after the policy expires.
- 3
Describe your site
Answer three questions about your HTTP redirect, HTTPS on every subdomain and subdomains run by other parties. Type the domain that sends the header, list up to 50 subdomains, and tick No HTTPS beside any that lack it.
- 4
Copy the header and read the preload checklist
Copy the header line or the value alone. Read what hstspreload.org says preloading commits you to, then its requirements: three are checked against your header, and the others depend on your answers or your live site.
What a browser does with a Strict-Transport-Security header
RFC 6797 defines HSTS as a way for a site to declare that it should be reached only over secure connections. The site sends the Strict-Transport-Security header on an HTTPS response, and a browser that receives it with no errors or warnings on the secure connection notes the host as a known HSTS host for the number of seconds in max-age. MDN puts the effect plainly: the header does not change how the browser handles the response that carried it, only how it makes later requests. From then on, before loading any http:// address on that host, the browser switches it to https://. An explicit port 80 becomes 443, and any other explicit port stays as written. If the secure connection has a certificate error, the browser ends it, and MDN says it does not offer the user a way to click through the error. Time matters in both directions. MDN says each time the browser receives the header, it sets the expiry to max-age from that moment, so a site that sends the same value on every response keeps moving the expiry forward. If later responses leave the header out, RFC 6797 says the browser keeps treating the host as an HSTS host until the expiry it already holds. Removing the header therefore does not switch HSTS off for browsers that have it. Once the period runs out with no new header, the entry expires and the RFC says the browser removes it. The weak point comes first. MDN notes that HSTS does not take effect until the browser has made at least one secure connection and received the header, so an http:// address loaded before then is open to network attacks. RFC 6797 also says a browser ignores the header on a plain HTTP response and a host must not send it there. The tool's timeline therefore counts from the first HTTPS response that carries it.
How the checker reads your header against RFC 6797
RFC 6797 gives the header a short grammar. Directives are separated by semicolons, and each is a name, optionally followed by an equals sign and a value. Names and values follow HTTP/1.1's definitions of a token and a quoted string. The checker reads the value one character at a time with that grammar, so a semicolon inside a quoted value does not split it. It treats a comma between directives, a missing semicolon or curly quotes pasted from a word processor as breaking the grammar, and reports where the value stops following it. Beyond the grammar, the RFC sets rules the checker applies to every header. The order of directives does not matter, and names are compared without regard to letter case, so Max-Age and max-age are the same directive. Every directive must appear only once. max-age is required, and once any quotes are removed its value must be one or more digits, so max-age="31536000" is allowed while max-age=-1, max-age=1.5 and max-age=31536000s are not. includeSubDomains takes no value. The RFC says a browser must ignore a header that does not follow its syntax, and must ignore directives it does not recognise, processing the ones it does recognise only when the header otherwise meets the rules above. Two more rules matter in practice. The RFC says a host must send only one Strict-Transport-Security header in a response, and a browser that receives more than one processes only the first; if you paste several header lines, the checker reads the first and says so. And preload is not one of the RFC's directives, so a browser following the RFC ignores it. The checker reports the rule each problem breaks, not how a particular browser behaves.
includeSubDomains reaches every subdomain, including the ones you forgot
includeSubDomains extends the policy from the host that sends it to every subdomain of that host's name, at any depth. MDN gives the example of a policy for secure.example.com with includeSubDomains: it also applies to login.secure.example.com and admin.login.secure.example.com, but not to example.com or insecure.example.com. The subdomain map in the tool applies the comparison RFC 6797 describes, label by label from the right, to the names you list. It maps only the policy you build: a policy from a domain above yours, or a preload listing, can cover a name it shows as not covered. The case for the directive is in the RFC's security considerations. Without it, section 14.4 says a web application cannot adequately protect cookies set for the whole domain, even ones with the Secure flag set; its example has an attacker point an unused subdomain name at their own server to obtain such a cookie. The risk runs the other way too. Section 14.5 says that if any subdomain does not support properly configured secure transport, it will be unreachable from browsers that hold the policy. hstspreload.org's deployment advice starts there: examine all subdomains and nested subdomains, including internal ones that are not publicly accessible, and make sure they work over HTTPS before the header goes out with includeSubDomains. The map lets you mark the ones you know lack HTTPS and shows which the current combination would leave unreachable. Subdomains run by another party deserve their own line in that review. A mail, help desk or marketing provider may host a name under your domain, and once includeSubDomains or preload covers it, that provider has to serve HTTPS on it for as long as browsers hold your policy. One more point from MDN: a browser can reach a subdomain before it ever visits the main domain, so each subdomain should send its own header even when the main domain uses includeSubDomains. RFC 6797 makes the same point about well-known entry points such as www.
What preloading commits you to, before you submit
preload does not come from RFC 6797. It comes from hstspreload.org, the submission site for the HSTS preload list that Chrome maintains and builds into Chrome, and the site says Firefox, Safari, IE 11 and Edge also have preload lists based on the Chrome list. MDN describes the preload service as not part of the HSTS specification and not to be treated as official. The directive does nothing on its own in a browser that follows the RFC. hstspreload.org says a site that sends it is considered to be requesting inclusion, and may then be submitted through its form. The list exists to cover the first visit: for a listed domain, the site says requests will only be made over HTTPS, and any HTTP request is upgraded and fails to connect if HTTPS is unavailable. The commitment is the operational part. Its form asks you to confirm that preloading will prevent all subdomains and nested subdomains from being accessed without a valid HTTPS certificate, and it notes that preloading applies to internal subdomains that are not publicly accessible. A site must keep meeting the requirements at all times, and sites may be removed automatically for failing to keep them up. Inclusion cannot easily be undone. Domains can be removed, but hstspreload.org says it takes months for a change to reach users with a Chrome update, and new entries can take several months to reach the stable version of Chrome. Its own advice is restrained. It recommends HSTS but not preloading. It says many browsers (it names Chrome and Safari) automatically upgrade all HTTP navigations to HTTPS regardless of a domain's HSTS policy, that preloading only provides value when those upgrades fail in the presence of an active attacker, and that its benefits are minimal compared to those of HSTS. It also asks projects that give HTTPS configuration advice or offer an option to enable HSTS not to include the preload directive by default. preload starts switched off here for that reason.
What the tool does with your input, and what it cannot tell you
Everything runs in this page. The header you paste, your answers, the domain and the subdomain names are read by code in your browser and are not sent anywhere, and the names are compared with each other without being looked up. When a header is checked, the page sends one analytics event that names the tool and the page, and nothing you typed. The limits keep the page quick. A paste can be up to 2,000 characters, and a longer one is refused rather than read in part, so a result never describes a cut header. The domain can be up to 253 characters and the subdomain list up to 5,000 characters; the map shows the first 50 names it can use and says how many it left out. The max-age box takes up to 10 digits; a longer max-age is checked but not loaded into the builder. A paste can be a bare value, one header line or a block of response headers, and in a block only lines named Strict-Transport-Security are read. A value folded onto indented continuation lines is joined first. Names are read in ASCII, from letters, digits, hyphens and underscores, and an IP address is refused, because RFC 6797 identifies HSTS hosts only by domain name. Some things the tool cannot tell you. It does not fetch your site, so it cannot confirm that the header is sent, on which responses or hostnames, or that http:// redirects to https://. It cannot see your certificate, whether a subdomain serves HTTPS, what browsers stored from headers you sent before, or any policy or preload listing for your domain or a domain above it. Your answers stay answers: the checklist marks which requirements rest on them, and three requirements, the certificate, the header on your base domain and the header on any extra redirect from your HTTPS site, always show as to be confirmed on the live site.
Sources
- IETF (RFC Editor): RFC 6797: HTTP Strict Transport Security (HSTS)
- IETF (RFC Editor): RFC 2616: Hypertext Transfer Protocol, HTTP/1.1
- IETF (RFC Editor): RFC 5890: Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework
- MDN Web Docs: Strict-Transport-Security header
- hstspreload.org: HSTS Preload List Submission
Worked example
An invented example, not taken from any site: a small business, shown here as example.com, pastes the header its host added and lists three subdomains, one of them an old reports site.
- Pasted header
- Strict-Transport-Security: max-age=31536000, includeSubDomains
- Subdomains listed
- www, mail, reports
- Marked No HTTPS
- reports.example.com
- Subdomains run by others
- Yes, the mail provider
The checker reports the comma as breaking RFC 6797's syntax, so the header does not follow the RFC. Typed as max-age=31536000; includeSubDomains, it covers all three subdomains, and the map shows reports.example.com as unreachable for browsers holding the policy.
The business moves the reports site to HTTPS and confirms HTTPS with its mail provider before sending includeSubDomains. It leaves preload off: the checklist shows two of the three header requirements met, and the others still depend on its answers or the live site.
Who uses this tool
Developers switching HSTS on
Start at five minutes, read what each ramp-up stage means for returning visitors, and copy the exact header for each stage.
Owners of domains with many subdomains
List the names your mail, help desk and marketing providers run and see which ones includeSubDomains would bind before you add it.
Teams weighing the preload list
Read what preloading commits every subdomain to, then see which of hstspreload.org's requirements your header meets and which need the live site.
Anyone switching HSTS off
See what max-age=0 does, why it reaches only browsers that come back over HTTPS, and what it leaves in place for subdomains.
Frequently asked questions
What does an HSTS header do?
It tells a browser to use HTTPS for your host on later visits. MDN says a browser that has received it upgrades http:// addresses to https:// and will not let the user bypass certificate errors such as an invalid certificate. RFC 6797 says max-age sets how many seconds the browser keeps the policy, and includeSubDomains extends it to every subdomain. The header does not change the response that carried it.
What max-age should an HSTS header use?
hstspreload.org suggests ramping up in stages with includeSubDomains: 300 seconds (5 minutes), 604800 (1 week), then 2592000 (1 month), checking for broken pages and waiting out each stage. Its preload list requires at least 31536000 seconds (1 year), and its example header uses 63072000 (2 years). A short value limits how long a mistake stays in browsers, while a long one keeps the policy between visits.
When should I add includeSubDomains?
Once every subdomain, internal ones included, serves HTTPS. RFC 6797 says subdomains without properly configured secure transport become unreachable from browsers that hold a policy with includeSubDomains, and that without the directive, cookies set for the whole domain cannot be adequately protected. List your subdomains in the tool, mark any that lack HTTPS and check which the policy would cover, including names a mail or marketing provider runs for you.
Should I add preload to my HSTS header?
Read what it commits you to first. hstspreload.org recommends HSTS but not preloading. Its form asks you to confirm that preloading will prevent all subdomains and nested subdomains from being accessed without a valid HTTPS certificate, and it says a removal takes months to reach users with a Chrome update. A site that sends preload is considered to be requesting inclusion, and may then be submitted through that form.
How do I turn HSTS off?
Send max-age=0 over HTTPS. RFC 6797 says this tells a browser to remove the policy, includeSubDomains included. MDN adds that it only takes effect once a browser makes a secure request and receives the header, that HSTS cannot be disabled over plain HTTP, and that it does not delete separate policies subdomains set themselves. Browsers that never come back keep the old policy until it expires. A preloaded domain also needs hstspreload.org's removal form.
Does this HSTS checker test my live site?
No. It reads only what you paste, type and answer on this page, and it never fetches your site, so it cannot confirm that the header is sent, on which responses, or that your redirect exists. To see what your site sends, copy the page's response headers from your browser's developer tools and paste them in. When you check a header, the page sends one analytics event that names the tool and the page, and nothing you typed.