Skip to content

Ready

Enter a domain on the left and run the test. Results stream in here.

Closing the gap a redirect leaves open

Redirecting http:// to https:// is not enough on its own. When someone types your domain or clicks an old http:// link, the browser's first request still goes out unencrypted, and an attacker on the same network (a café Wi-Fi, for example) can intercept it before the redirect happens. HTTP Strict Transport Security (HSTS) fixes this: once a browser has seen the Strict-Transport-Security header from your site, it switches every future http:// request to https:// itself, without ever sending the insecure one.

This checker fetches your URL, follows redirects to the final page, reads the Strict-Transport-Security header and decodes it. It reports max-age in plain time (for example "1 year"), whether includeSubDomains and preload are set, and whether the header would meet the preload list's requirements. It also makes a separate request to http:// on the same host to confirm that it redirects to https://, because HSTS only starts working after a browser has reached your HTTPS site once.

max-age, includeSubDomains and preload explained

max-age is how many seconds the browser should remember the rule. Without it, the header does nothing. A value of 0 switches HSTS off and clears it from browsers. The checker warns below one year (31536000 seconds), which is both the common recommendation and the preload minimum.

includeSubDomains applies the rule to every subdomain as well, such as shop.example.com and mail.example.com. That closes gaps where an insecure subdomain could be used to tamper with cookies, but it also means every subdomain must work over HTTPS, including old ones you may have forgotten.

preload signals that you want your domain added to the HSTS preload list, a list of HTTPS-only domains built into Chrome, Firefox, Safari and Edge. Preloaded domains are protected even on the very first visit. The directive on its own does nothing; you must also submit the domain at hstspreload.org.

Rolling HSTS out without locking anyone out

Browsers obey HSTS strictly. If a subdomain cannot serve a valid certificate while HSTS covers it, visitors get an error with no way to click through. That is why the safest rollout raises the stakes in steps, checking for problems at each one:

# Step 1: short trial, main host only
Strict-Transport-Security: max-age=300

# Step 2: one week, still main host only
Strict-Transport-Security: max-age=604800

# Step 3: every subdomain confirmed on HTTPS, one year
Strict-Transport-Security: max-age=31536000; includeSubDomains

# Step 4: ready for the preload list (two years is the common choice)
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

Before step 3, list every subdomain that serves anything, including internal tools, old marketing sites and services hosted by third parties on your domain, and confirm each works on HTTPS. Before step 4, remember that removal from the preload list is slow and depends on browsers shipping updates, so treat it as a long-term commitment.

Sending the header on your server or platform

# Nginx: only in the HTTPS server block
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

# Apache: in the :443 virtual host (needs mod_headers)
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"

Send the header only on HTTPS responses. Browsers ignore it over plain HTTP, so adding it there is harmless but pointless.

Cloudflare

Turn it on under SSL/TLS, then Edge Certificates, then HTTP Strict Transport Security (HSTS). Cloudflare lets you pick max-age, includeSubDomains and preload, and shows the same lock-out warning.

WordPress

Add the header in your server config, through your host's control panel, or with a security plugin that supports response headers. Make sure your site URL settings already use https://.

Shopify and other hosted platforms

Shopify manages HTTPS and response headers for storefronts, and you cannot add custom headers there. Hosts such as Vercel and Netlify may add a default HSTS header for you. In every case, run this check on your own domain to see what is actually served rather than relying on defaults.

Reasons the header does not show up

The header is set on a different host than the one you tested (for example on www but not on the bare domain). A CDN or proxy in front of your server strips or replaces it. It is only added on some routes, such as the homepage. Or it is added in the HTTP server block rather than the HTTPS one. The checker reads the final HTTPS response after redirects, so if it reports "missing", the browser is not getting it either.

For preload, the header must also be sent by the bare domain, not only by www. If you tested a www address, the checker reminds you to check https:// on the bare domain too before submitting.

Does HSTS help SEO?

Not directly. HSTS is not a ranking factor, and Google ranks on whether pages are served over HTTPS, not on this header. Its value is protection: it prevents interception attacks that could inject spam or malware into your pages, and those can lead to security warnings and lost visibility. It also stops browsers loading http:// versions of your pages, which keeps the experience consistent. Our guide to security headers and SEO explains where each header fits.

Related checks worth running alongside

HSTS assumes your certificate is valid everywhere it applies, so run the SSL Checker on each host first. Use the Redirect Chain Checker to confirm http:// reaches the right https:// page in one hop, and the HTTP Header Checker to see the rest of your security headers in one list. Re-check after server moves and CDN changes, which are the usual moments the header disappears.

How it works

  1. Enter a URL

    Paste your HTTPS domain or any URL on it to inspect its transport-security header.

  2. We read the header

    The tool fetches the response, reads Strict-Transport-Security, and parses max-age, includeSubDomains, and preload.

  3. Check preload eligibility

    See a clear breakdown of each directive plus whether your config qualifies for the HSTS preload list.

Frequently asked

What is HSTS?

›

HTTP Strict Transport Security is a response header that tells browsers to use HTTPS only for your site for a set time. After the first visit, the browser upgrades every http:// request itself, so an attacker cannot intercept an insecure first request.

What max-age should I use?

›

At least 31536000 seconds (one year) once you are confident; 63072000 (two years) is common for preload. Start lower, such as 300 seconds and then a week, while you confirm nothing breaks. max-age=0 switches HSTS off.

What does includeSubDomains do?

›

It applies the HTTPS-only rule to every subdomain too. That closes gaps but means every subdomain, including old or third-party-hosted ones, must work over HTTPS, or browsers will refuse to load it.

What is the HSTS preload list?

›

A list of HTTPS-only domains built into major browsers, so protection applies even on a first visit. To qualify you need HTTPS, a redirect from http to https, max-age of at least one year, includeSubDomains and preload, all sent by the bare domain. Then submit the domain at hstspreload.org.

Is preloading risky?

›

It is hard to undo. Removal depends on browser updates and can take months, during which every subdomain must keep working over HTTPS. Only preload once you have checked every subdomain and plan to stay HTTPS-only.

Why does the tool check the http:// version of my site?

›

HSTS only takes effect after a browser reaches your HTTPS site once. The tool requests http:// on the same host to confirm it redirects to https://; if it does not, first-time visitors can still land on the insecure version.

Why is my HSTS header not detected?

›

Common causes: it is set on www but not the bare domain (or the reverse), a CDN or proxy strips it, it is only added on some routes, or it is configured in the HTTP server block instead of the HTTPS one. The tool reads the final HTTPS response after redirects.

Does HSTS improve SEO?

›

Not directly; it is not a ranking factor. It protects visitors from interception attacks that could inject spam or malware, which could lead to security warnings and lost visibility, and it keeps every visit on HTTPS.

Related tools

More Technical SEO tools

See all Technical SEO tools · All free SEO tools

Related guides

↳ full site audit190+ checks · AI fix instructions · yearly plans