HSTS: HTTP Strict Transport Security for SEO
What HSTS actually does, the Strict-Transport-Security header syntax (max-age, includeSubDomains, preload), the browser-only internal redirect crawlers never see, why it doesn't replace your 301s, and how preload can lock you in — from Patrick Stox.
1 evidence signal on this page
- Related live toolHTTP Header Checker
HSTS (HTTP Strict Transport Security) is a Strict-Transport-Security response header — honored only when it arrives over a secure connection — that tells a browser to always use HTTPS for your domain going forward, closing the insecure gap that a new visitor's first request still makes over HTTP before your 301 fires. It's a browser-layer, per-client policy on top of your server-side redirects, not a replacement: RFC 6797 has the browser rewrite the URI to HTTPS internally before any request goes out (often shown as an internal 307-style redirect, though the RFC doesn't mandate a specific status code), so no server ever sees the HTTP form and crawlers still need your real 301 to understand the move and carry link equity. The header has three directives — max-age (required), includeSubDomains, and preload. Preload bakes your domain into the browser itself via hstspreload.org (requiring max-age of at least a year, includeSubDomains, and the preload flag) and is close to irreversible — removal is a separate submission that takes months to reach users. HSTS is also deliberately unforgiving: a browser that knows you as an HSTS host will hard-fail with no click-through if your certificate ever breaks. So enable it only once HTTPS is genuinely solid across every subdomain, and treat preload as a one-way door.
TL;DR — HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. is a small instruction your server sends browsers that says “always use HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' for my site — never plain HTTP.” It plugs a tiny security hole that a normal HTTP→HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. leaves open, and it doesn’t hurt SEO. But it’s strict on purpose: once it’s on, a broken certificate breaks your site with no way for visitors to click past the warning. Turn it on only when your HTTPS setup is genuinely solid.
What HSTS is
You already know you should be on HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' — the encrypted,
padlock version of your site. The normal way to force it is a redirect: when
someone types http://yoursite.com, your server sends them a 301 redirect to
https://yoursite.com. That works, but there’s a sliver of a gap. That very first
request — the one before the redirect fires — still goes out over insecure HTTP.
An attacker sitting on the same Wi-Fi can pounce in that window.
HSTS — HTTP Strict Transport Security — closes that gap. It’s a short instruction
(a “header”) your server adds to its responses — but only the ones served over a
genuinely secure connection; the same header sent over plain HTTP is ignored, since
an attacker could otherwise inject or strip it — that tells that one browser: for
the next however-many months, never even try HTTP for this site — go straight to
HTTPS. It’s a policy each browser learns and stores for itself, not something that
changes your server. Once a browser has seen it, it upgrades http:// links to
https:// all on its own, before anything leaves the device. Evidence for this claim After receiving HSTS, a browser upgrades future HTTP attempts to HTTPS before sending the request. Scope: MDN documents user-agent enforcement after the header has been learned; first-visit protection requires preload or a prior secure visit. Confidence: high · Verified: MDN: Strict-Transport-Security header
Does HSTS help or hurt SEO?
Neither, directly. HSTS is a security and trust feature, not a ranking lever.
It won’t move you up the results — but done right it won’t hurt you either. The one
thing to understand is that HSTS is not a substitute for your redirects. You
still need your real server-side 301 redirects from HTTP to HTTPS, because that’s
what Google and Bing actually see and use. HSTS works inside the browser for real
human visitors; crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. don’t rely on it. Keep both.
The one big warning
HSTS is deliberately unforgiving. Once a browser has “learned” your site is HTTPS-only, it will refuse to load the site at all if your certificate ever expires or misconfigures — with no “proceed anyway” button. That’s the whole point (it stops attackers from tricking people onto a fake HTTP version), but it means a lapsed certificate goes from “annoying warning” to “site is down for anyone who’s visited before.”
There’s also a supercharged version called preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. that bakes your domain into the browser itself. It’s great, but getting off the preload list later is slow and painful — think months. So preload is a one-way door: only walk through it when you’re sure. Evidence for this claim HSTS preload requires at least a one-year max-age, includeSubDomains, and preload; removal can take months to reach users. Scope: The Chromium preload service documents submission and removal behavior; requirements can change and should be rechecked before submission. Confidence: high · Verified: Chromium: HSTS Preload List Submission
Want the header syntax, the browser-only internal redirect crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see, the preload requirements, and the real lockout scenarios? Switch to the Advanced tab.
TL;DR — HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. is the
Strict-Transport-Securityresponse header, honored only when a browser receives it over a secure connection, and stored per-client as future policy for that host. It closes the “first request problem” a 301 alone leaves open: the initial HTTP request from a new visitor is insecure until the redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. fires, and that’s the window an SSL-stripping attacker wants. Three directives:max-age(required, seconds),includeSubDomains,preload. When a browser enforces HSTS it rewrites the URI to HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' internally, before any request reaches a server — RFC 6797 doesn’t mandate a specific status code for that rewrite, though tools often surface it as a 307 — so your server-side 301s are still mandatory for search engines and link equityPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems.; HSTS is on top of them, not instead. PreloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. bakes your domain into the browser via hstspreload.org (requiresmax-age≥ 31536000,includeSubDomains, andpreload) and is close to irreversible — removal is a separate submission that takes months to reach users. And HSTS is designed to hard-fail on any cert error, so enable it only when HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' is robust across every subdomain.
The HTTPS hubHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' introduces HSTS as a browser-layer protection that sits on top of your 301s. This page is the deep dive: the exact header syntax, the internal redirect that trips SEOs up, the preload list’s near-irreversibility, and the real-world ways HSTS locks people out.
The problem HSTS actually solves: the first request
Picture a properly migrated site. Every http:// URL 301-redirects to its https://
twin, the certificate is valid, canonicals point to HTTPS. Looks airtight. It isn’t,
quite.
When a brand-new visitor types yoursite.com (no scheme) or clicks an old
http://yoursite.com link, the browser’s first request goes out over plain HTTP.
Your server answers with the 301, and every request after that is secure. But that
one initial round-trip happened in the clear — and that’s exactly the window an
SSL-stripping attacker on the same network wants. They intercept the HTTP request,
keep the victim on HTTP while they proxy HTTPS to your server, and read or rewrite
everything.
HSTS eliminates that window for anyone who has visited before. web.dev is direct
about the mechanism:
“use Strict Transport Security to tell clients they should always connect to your
server using HTTPS, even when following an http:// reference. This defeats attacks
like SSL Stripping, and avoids the round-trip cost of the 301 redirectA 301 redirect is the HTTP status code for a permanent move: it tells browsers and search engines a URL has moved for good, and it's the strongest signal for consolidating a page's ranking signals onto the new URL. Google says permanent redirects don't cause a loss in PageRank..”
(web.dev).
That last clause matters for performance too: a returning browser skips the HTTP→HTTPS
round-trip entirely. Evidence for this claim After receiving HSTS, a browser upgrades future HTTP attempts to HTTPS before sending the request. Scope: MDN documents user-agent enforcement after the header has been learned; first-visit protection requires preload or a prior secure visit. Confidence: high · Verified: MDN: Strict-Transport-Security header
Two boundary conditions worth being precise about. First, HSTS is stored, per-client policy — it lives in that one browser’s own state for that host, learned from a header delivered over a secure connection; the same header sent on an HTTP response is ignored outright (an attacker who can inject or strip headers on plain HTTP could otherwise neutralize it), and a client that has never received it — a fresh install, a different browser, a crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. — has no policy to enforce. Second, the rewrite is scheme-and-port aware: an implicit port 80 request becomes an implicit port 443 request, but if the original URI named an explicit non-default port, the browser keeps that same port number and simply contacts it over HTTPS instead.
The header syntax
The missing-header result says only that the final HTTPS response did not carry Strict-Transport-Security. It does not mean adding preload immediately is safe.
Use my HTTP Header Checker to inspect the redirect chain and final HSTS value from the public edge before increasing max-age or adding subdomains. HTTP Header Checker Free
- Confirm HTTP reaches HTTPS with a server-side permanent redirect.
- Inspect Strict-Transport-Security on the final response and inventory every covered subdomain.
- Increase max-age gradually; add includeSubDomains and preload only after certificate operations are proven.
HSTS is one response header with up to three directives. Per MDN, the forms are:
Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000; includeSubDomains
Strict-Transport-Security: max-age=63072000; includeSubDomains; preloadmax-age=<seconds>— required. “The time, in seconds, that the browser should remember that a host is only to be accessed using HTTPS” (MDN).31536000is one year;63072000is two. The clock resets on every response that carries the header, so an active site continually renews its policy. This is relative, per-client state: simply removing the header doesn’t immediately clear it — a browser that already learned the policy keeps enforcing it until its storedmax-ageruns out. To turn HSTS off for clients that already learned it, you have to actively servemax-age=0over a secure response; the browser then forgets the policy on its next secure visit. (max-age=0clears a learned policy only — it does not remove a domain from the separate preload list.)includeSubDomains— optional. “If this directive is specified, the HSTS policy applies to all subdomains of the host’s domain as well” (MDN). Powerful and dangerous in equal measure — see the lockout scenarios below.preload— optional. A flag that signals your intent to be on the browser preload list. It does nothing on its own; it’s a prerequisite for submitting to hstspreload.org. Evidence for this claim HSTS preload requires at least a one-year max-age, includeSubDomains, and preload; removal can take months to reach users. Scope: The Chromium preload service documents submission and removal behavior; requirements can change and should be rechecked before submission. Confidence: high · Verified: Chromium: HSTS Preload List Submission
The behavior, again from MDN:
“Before loading an http URL, the browser checks the domain name against its HSTS
hosts list. If the domain name is a case insensitive match for an HSTS host or is a
subdomain of one that specified includeSubDomains, then the browser replaces the
URL scheme with https.”
The internal upgrade crawlers never see (this is the SEO crux)
Here’s the single most misunderstood thing about HSTS, and the reason it can’t replace your redirects.
When a browser upgrades an http:// request under HSTS, it rewrites the URI to
HTTPS internally, before any network request is made — RFC 6797 requires the
scheme substitution itself but does not mandate a particular status code for it
(RFC 6797 §8.3), so a
given browser or crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor. tool may represent that internal step however it likes —
many display it as an internal 307, but that’s client/tool-specific, not a protocol
guarantee. What matters for SEO is simpler and holds regardless of the label: no
server is contacted for the HTTP version, so no crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. ever sees it. GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. and
BingbotBingbot is Microsoft Bing's primary web crawler — the bot that discovers, fetches, and renders pages to build the Bing index. That index also powers Yahoo, DuckDuckGo, Ecosia, and Microsoft Copilot, so Bingbot's reach is far wider than Bing's own search-market share. don’t carry a learned HSTS policy around the way a returning human’s Chrome
does — they hit your server fresh, and what they need to see there is a real,
server-side 301. Evidence for this claim RFC 6797 requires the user agent to rewrite a known-HSTS-host HTTP URI to HTTPS internally, but does not mandate any specific redirect status code for that internal rewrite; how a given browser or crawling tool represents that step (e.g., as an internal 307) is a client/tool implementation detail, not a protocol requirement. Scope: RFC 6797 Section 8.3 ("URI Loading and Port Mapping") specifies the UA MUST replace the URI scheme with https; it does not prescribe an HTTP status code for that internal substitution, since no HTTP exchange occurs for it. Section 7.2's suggestion of status code 301 addresses ordinary server-side redirect behavior, not this internal client-side rewrite. Confidence: high · Verified: RFC 6797 §8.3 — URI Loading and Port Mapping
So the rule is blunt: HSTS does not replace your server-side 301s. The 301 is what search engines use to understand the protocol move and to consolidate signals (301 and other permanent redirects don’t cause a loss in PageRank, per Google). The browser-only internal upgrade is a user-experience and security layer on top. You need both, doing different jobs:
- 301 (server-side): for crawlers, indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed., and link equity.
- Internal 307-style upgrade (browser-side, from HSTS): for returning humans and SSL-stripping protection — the exact status representation varies by client/tool.
Any guide that tells you HSTS “handles the redirect so you can drop your 301” is wrong in a way that will quietly cost you.
HSTS preload: the near-permanent version
max-age protects returning visitors, but it has a bootstrap problem: a
first-time visitor who has never received your header is still exposed on that
initial request. Preload solves it by hardcoding your domain into the browser’s
source itself, so the browser knows you’re HTTPS-only before it has ever connected.
You opt in at hstspreload.org. The requirements are exact:
- “Serve a valid certificate.”
- “Redirect from HTTP to HTTPS on the same host, if you are listening on port 80.”
- “Serve all subdomains over HTTPS” — including in particular the
wwwsubdomain if a DNS record exists. - On the base domain’s HTTPS response, an HSTS header where “the
max-agemust be at least31536000seconds (1 year),” “theincludeSubDomainsdirective must be specified,” and “thepreloaddirective must be specified.” (hstspreload.org)
That’s why the two-year example above (max-age=63072000; includeSubDomains; preload)
is the shape people submit — note these are the exact submission requirements as
published by hstspreload.org; treat them as the current bar, not a permanent
constant, and re-check the live page before you submit.
It helps to keep four distinct states straight, since people conflate them constantly:
| State | What’s actually true |
|---|---|
| Token present | Your header includes preload. This is a flag only — it does nothing by itself and doesn’t put you on any list. |
| Eligible | Your site meets all four hstspreload.org requirements above (cert, redirect, subdomains, header shape). Still not on the list. |
| Submitted / pending | You’ve submitted at hstspreload.org and it’s queued for inclusion in an upcoming browser release. Not yet enforced for real users. |
| Actually listed | The domain is baked into a given browser’s shipped build. Enforcement only exists for users on that build — rollout isn’t instant or universal across browsers. |
Removal runs the same four states in reverse, and just as slowly: removing the
preload directive from your header makes you eligible for the removal form, then
submission is pending, and the domain stays enforced for any user on a browser build
that still ships it — until that build cycles out.
Now the part that turns preload into a one-way door. From the submission site itself: “Be aware that inclusion in the preload list cannot easily be undone. Domains can be removed, but it takes months for a change to reach users with a Chrome update and we cannot make guarantees about other browsers.” (hstspreload.org). And its own advice: “Don’t request inclusion unless you’re sure that you can support HTTPS for your entire site and all its subdomains in the long term.”
Practical translation: preload is a genuinely great security posture, but if you ever need to serve anything — a legacy subdomain, an acquired brand, an internal tool — over plain HTTP again, you’re stuck waiting on browser release cycles to reach every user. Kinsta’s guide puts the operational reality plainly: it can be a difficult and time-consuming process to get your domain removed. Treat preload as permanent.
Why HSTS is designed to hurt when things break
HSTS’s strictness is not a bug — it’s the entire security guarantee. web.dev spells out the tradeoff: “Clients that have listed your site as a known HSTS Host are likely to hard-fail if your site ever has an error in its TLS configuration, (such as an expired certificate). HSTS is explicitly designed this way to ensure that network attackers can’t trick clients into accessing the site without HTTPS.” (web.dev).
The conclusion Google draws is the sentence I’d tattoo on anyone about to flip this on: “Don’t enable HSTS until you’re certain your site operation is robust enough to avoid ever deploying HTTPS with certificate validation errors.” (web.dev).
“Hard-fail” means exactly that: no “proceed anyway” link, no click-through. On a normal HTTPS page, an expired cert throws a scary interstitial that a determined user can bypass. On an HSTS host, the browser refuses outright. So the failure mode of a missed certificate renewal changes category — from “traffic dips because people are scared off” to “the site is unreachable for every returning visitor.”
Real-world lockout scenarios
The ways HSTS bites in practice almost always trace back to includeSubDomains or
preload getting ahead of your actual HTTPS coverage:
- The forgotten subdomain. You set
includeSubDomainsonexample.com, butlegacy.example.com(an old app, a status page, a vendor tool) only speaks HTTP or has a cert that doesn’t cover it. Every browser that saw the header now refuses to load that subdomain. Nothing changed on that server — the policy reached down and broke it. - The wildcard-cert gap. A
*.example.comwildcard coversfoo.example.combut notfoo.bar.example.com(a wildcard is one DNS label deep). If a deeper subdomain relies on HTTP or a mismatched cert,includeSubDomainslocks it out. - The expired cert on an HSTS host. Renewal automation fails, the cert lapses, and instead of a bypassable warning you get a site that’s down for everyone whose browser remembers your policy — until you get a valid cert back and they reconnect and receive a fresh secure response. There is no faster override.
- Preload regret. You preloaded, then a business need forces an HTTP-only
service under the domain. Rolling that back is two separate, non-instant jobs, not
one: serving
max-age=0over HTTPS only clears the learned policy for clients that reconnect before their old max-age would’ve expired anyway, while getting the domain out of the preload list is a distinct submission that still takes browser release cycles — months — to reach users, independent of anything you change on your server. - Local dev / staging collisions. Preloading
example.comwithincludeSubDomainscan makedev.example.comor alocalhost-style internal host under the same apex refuse HTTP, breaking local workflows in surprising ways.
None of these are reasons to avoid HSTS. They’re reasons to stage it: short
max-age first, add includeSubDomains only after auditing every subdomain, and
reserve preload for when you’re certain.
HSTS is not a ranking play (and doesn’t touch canonicalization)
To be clear on the SEO framing: HSTS is not a ranking signal. HTTPS itself is
a deliberately tiny oneHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' — Google called it a “very lightweight
signal” affecting fewer than 1% of queries — and HSTS is a layer on top of HTTPS, not
a separate ranking input. It also doesn’t directly control canonicalizationHow search engines pick one canonical URL among duplicates and consolidate signals onto it. or
indexing. Google’s own documentation is more specific than a flat “doesn’t matter,”
though: Google prefers HTTPS as canonical over an equivalent HTTP page except
when there’s an invalid certificate, insecure page dependencies, an HTTPS page that
redirects to HTTP, or an HTTP rel="canonical" tag
(Google: consolidating duplicate URLs).
HSTS cannot fix or override any of that. It’s a browser-side policy with no
influence on Google’s canonicalization logic — a bad certificate or a broken redirect
chain can still push Google toward an HTTP canonical regardless of what your HSTS
header says. Canonicalization is driven by your 301s, your certificate, your
rel="canonical", and your internal linksAn internal link is a hyperlink from one page on a website to another page on the same website. Internal links help search engines discover your pages and pass ranking signals (PageRank and anchor-text context) between them. — HSTS earns its place for security,
user trust, and closing the SSL-stripping gap — do it for those reasons, keep your
301s and certificate genuinely solid, and you’ll never see HSTS itself on a rankings
report either way.
If you’re running the broader HTTP→HTTPS move, HSTS is the last thing you switch on, not the first — it belongs after the migration has settled, as part of the wider site migrationA site migration is any significant change to a website's URL structure, domain, platform, protocol, or hosting that can affect how search engines crawl, index, and rank it. The risk scales with how much you change at once. discipline.
AI summary
A condensed take on the Advanced version:
- HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. = the
Strict-Transport-Securityresponse header. It tells browsers to always use HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' for your domain, closing the “first request problem” a 301 alone leaves open — the initial HTTP request from a new visitor is insecure until the redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. fires, which is the SSL-stripping window. - Three directives:
max-age(required, seconds; resets on every response; removing the header doesn’t clear a learned policy — you must servemax-age=0over HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' instead),includeSubDomains(applies to all subdomains), andpreload(a flag to opt into the browser preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. list — tokenA token is the smallest unit of text (or image/audio/video) an LLM processes — roughly 4 characters, or about ¾ of an English word. A context window is the maximum number of tokens (input plus output) a model can hold at once, like its short-term memory. present, eligible, submitted, and actually listed are four separate states). - The internal-upgrade cruxChrome User Experience Report — Google's public dataset of real-world (field) performance data from eligible Chrome users. It's the official field-data source behind the Core Web Vitals program.: when a browser enforces HSTS it rewrites the URI to HTTPS internally before any request reaches a server — RFC 6797 doesn’t mandate a specific status code for that rewrite, though tools often show it as a 307 — so no server sees it and crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see it. Your server-side 301s are still mandatory for search engines and link equityPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems.. HSTS is on top of your 301s, never instead of them.
- Preload hardcodes your domain into the browser via
hstspreload.org (requires
max-age≥ 31536000,includeSubDomains, andpreload). It’s close to irreversible — removal is a separate submission that takes months to reach users, browser by browser. - Designed to hard-fail: an HSTS host with a broken/expired cert refuses to load, with no click-through. Google: “Don’t enable HSTS until you’re certain your site operation is robust enough to avoid ever deploying HTTPS with certificate validation errors.”
- Lockout scenarios cluster around
includeSubDomainsand preload outrunning your HTTPS coverage: forgotten HTTP subdomains, wildcard-cert depth gaps, lapsed certs, preload regret, and staging collisions. - Not a ranking signal — and can’t override canonicalizationHow search engines pick one canonical URL among duplicates and consolidate signals onto it.. Google prefers HTTPS as canonical except when a cert is invalid, dependencies are insecure, an HTTPS page redirects to HTTP, or the canonical tagA rel=\"canonical\" annotation — in the HTML <head> or an HTTP Link header — that tells search engines which URL is the preferred version of duplicate or near-duplicate content. points to HTTP — and HSTS has no power to fix or override any of that. Keep your 301s, certificate, and canonical tags doing the SEO work.
Official documentation
Primary-source documentation from browser and standards teams.
Google / web.dev
- Enable HTTPS on your servers (web.dev) — the HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. section: the header, SSL-stripping, the hard-fail warning, and “don’t enable HSTS until you’re certain.”
- Site moves with URL changes — why the server-side 301 is still mandatory (redirectsA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. don’t lose PageRankPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems.).
- Understanding page experience — where HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' (and by extension HSTS) sits in Google’s framing.
Standards & browser references
- MDN —
Strict-Transport-Security— full header syntax, the three directives, and how the browser upgrades the scheme. - RFC 6797 — HTTP Strict Transport Security (HSTS) — the original specification.
- HSTS Preload List submission (hstspreload.org) — the exact preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. requirements and the removal caveats, maintained by the Chromium project.
Quotes from the source
On-the-record statements from Google/web.dev and the Chromium preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. service. Each link jumps to (or points at) the quoted passage on the source page.
web.dev (Google) — what HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. does and the warnings
- “Use HTTP Strict Transport Security (HSTS) to avoid the cost of the 301 redirectA 301 redirect is the HTTP status code for a permanent move: it tells browsers and search engines a URL has moved for good, and it's the strongest signal for consolidating a page's ranking signals onto the new URL. Google says permanent redirects don't cause a loss in PageRank..” Jump to quote
- “First, use Strict Transport Security to tell clients they should always connect to
your server using HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.', even when following an
http://reference. This defeats attacks like SSL Stripping, and avoids the round-trip cost of the 301 redirectA 301 redirect is the HTTP status code for a permanent move: it tells browsers and search engines a URL has moved for good, and it's the strongest signal for consolidating a page's ranking signals onto the new URL. Google says permanent redirects don't cause a loss in PageRank..” Jump to quote - “Clients that have listed your site as a known HSTS Host are likely to hard-fail if your site ever has an error in its TLS configuration, (such as an expired certificate). HSTS is explicitly designed this way to ensure that network attackers can’t trick clients into accessing the site without HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'.” Jump to quote
- “Don’t enable HSTS until you’re certain your site operation is robust enough to avoid ever deploying HTTPS with certificate validation errors.” Jump to quote
Chromium preload service — hstspreload.org
- “Be aware that inclusion in the preload list cannot easily be undone. Domains can be removed, but it takes months for a change to reach users with a Chrome update and we cannot make guarantees about other browsers.” Source
- “Don’t request inclusion unless you’re sure that you can support HTTPS for your entire site and all its subdomains in the long term.” Source
MDN — the header behavior
- “Before loading an
httpURL, the browser checks the domain name against its HSTS hosts list. If the domain name is a case insensitive match for an HSTS host or is a subdomain of one that specifiedincludeSubDomains, then the browser replaces the URL scheme withhttps.” Source
Should I enable HSTS — and how far?
Walk it top to bottom. Each “no” is a stop sign, not a maybe. One distinction before
you start: the exact max-age figures below (a few minutes for a canary, a year for
a resting state) are Patrick’s operational staging recommendations, not protocol
requirements — the only hard numeric requirement is hstspreload.org’s preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch.
minimum (max-age ≥ 31536000), which is called out explicitly at that step. Adjust
the staging durations to your own risk tolerance and deployment cadence.
1. Is your whole site already on HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' with a valid certificate, and has the migration settled?
- No → Don’t touch HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. yet. Finish the HTTPS migrationHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' first: 301 every URL, fix mixed contentMixed content is when a page served over HTTPS loads a sub-resource — a script, stylesheet, image, iframe, or similar — over insecure HTTP. Browsers' current taxonomy is upgradable versus blockable; active mixed content (scripts, styles, iframes) is blocked, and passive mixed content (images, audio, video) is warned about or increasingly auto-upgraded, with exceptions like CORS-enabled images and srcset/picture candidates that are blockable, not upgradable., verify in Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results.. HSTS is the last switch, not the first.
- Yes → continue.
2. Is your certificate renewal automated and monitored (so a lapse can’t sneak up on you)?
- No → Fix that first. On an HSTS host a lapsed cert is a hard outage, not a warning. Get auto-renewal + expiry alerting in place, then continue.
- Yes → continue. Enable a short
max-age(e.g. a few minutes to a day) with noincludeSubDomainsyet, and confirm nothing breaks.
3. Have you audited every subdomain — including www, legacy apps, status pages,
and vendor hosts — and confirmed each serves valid HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'?
- No → Keep
includeSubDomainsoff. Adding it now would reach down and break any HTTP-only or mismatched-cert subdomain. - Yes → Raise
max-agetoward a year and addincludeSubDomains. This is a safe, strong resting state for most sites.
4. Do you want to close the first-ever-visit gap too, and are you certain you’ll never need to serve anything under this domain over plain HTTP again?
- No / not sure → Stop here.
max-age=31536000; includeSubDomains(no preload) is an excellent posture. Preload’s marginal gain isn’t worth its irreversibility if you’re unsure. - Yes, certain → Add the
preloadflag and submit at hstspreload.org. Treat it as permanent — removal takes months to reach users.
Separate, always-true branch: does enabling HSTS mean I can drop my 301s?
- Never. CrawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. don’t see HSTS’s browser-only internal upgrade. Keep your server-side 301s regardless of how far down this tree you go.
HSTS rollout checklist
Work top to bottom — each stage gates the next. The staged durations here are
operational recommendations, not protocol requirements — the only hard number is
preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch.’s max-age ≥ 31536000 minimum in Stage 3.
Before you enable anything
- Entire site (apex +
www+ all subdomains) serves HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' with a valid cert. - HTTP→HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' 301 redirectsA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. are in place server-side, one-to-one.
- Certificate auto-renewal is configured and expiry monitoring/alerting exists.
- The HTTP→HTTPS migrationAn HTTP to HTTPS migration is the process of moving every URL on a site from the insecure http:// scheme to the encrypted https:// scheme — installing a TLS certificate and 301-redirecting each old URL to its secure equivalent. Done correctly, it doesn't lose rankings or PageRank. has settled (Search ConsoleA free Google service that reports how a site performs in Google Search and surfaces problems with how Google crawls, indexes, and serves it. It's first-party data straight from Google — but you don't need it to appear in results. clean, no ranking freefall).
Stage 1 — prove it’s safe
- Add
Strict-Transport-Securitywith a shortmax-age(minutes to a day). - No
includeSubDomainsyet. Nopreloadyet. - Confirm the site loads normally across browsers and that nothing broke.
Stage 2 — commit
- Raise
max-ageto at least31536000(one year). - Audit every subdomain (incl.
www, legacy, status, vendor) for valid HTTPS. - Only after that audit passes, add
includeSubDomains. - Re-test each subdomain loads over HTTPS.
Stage 3 — preload (optional, near-permanent)
- You’re certain you’ll never need HTTP under this domain again.
- Header is
max-age=31536000(or more); includeSubDomains; preload. - HTTP on port 80 redirects to HTTPS on the same host.
- Submit and confirm status at hstspreload.org.
Always true — don’t skip
- Server-side 301s stay in place (crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see the browser-only internal upgrade).
- You have a documented rollback plan:
max-age=0served over HTTPS clears a learned (non-preloaded) policy for clients that reconnect before it would’ve expired anyway. Preloaded domains need the separate, slower removal-form process instead.
The mental models
1. HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. is a layer, not a replacement. Server-side 301 = for crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. and link equityPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems.. Browser-side internal upgrade (from HSTS, often shown as a 307 though the RFC doesn’t require that exact code) = for returning humans and SSL-stripping protection. Different audiences, different jobs. You always need both; HSTS never subtracts a 301.
2. HSTS closes a gap the 301 can’t. A 301 protects the second request onward. The first request — before the redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. fires — is still HTTP. HSTS (for returning visitors) and preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. (for first-ever visitors) are the only things that close that specific window.
3. Ratchet up, never jump.
max-age short → long. Bare header → includeSubDomains (after a subdomain audit) →
preload (only if certain). Every rung is reversible except the last. Don’t skip
rungs to save time.
4. Strictness is the feature, and it cuts both ways. The same hard-fail that stops an attacker also stops you when a cert breaks. So the prerequisite isn’t “do you want security?” — everyone does — it’s “is your certificate operation robust enough to never fail?”
5. Preload is a one-way door.
Non-preloaded HSTS can be relaxed for a client the next time it makes a secure
request and receives max-age=0 — no faster than that, and only for clients who
reconnect. Preload takes it a step further: removal is a separate submission that
takes months to reach users, browser release by browser release. Put it in the
“decisions we can’t easily take back” bucket and treat it accordingly.
6. HSTS is orthogonal to rankings — but can’t rescue a bad canonical signal either. It’s not a ranking signal and doesn’t directly control canonicalizationHow search engines pick one canonical URL among duplicates and consolidate signals onto it. or indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed.. Judge it on security and trust, not on SEO upside — there isn’t any. But it’s not a safety net either: Google’s HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'-canonical preference still backs off for a bad cert, insecure dependencies, an HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'→HTTP redirect, or an HTTP canonical tagA rel=\"canonical\" annotation — in the HTML <head> or an HTTP Link header — that tells search engines which URL is the preferred version of duplicate or near-duplicate content., and HSTS has no power to override that.
HSTS — cheat sheet
The header directives
| Directive | Required? | What it does |
|---|---|---|
max-age=<seconds> | Yes | How long the browser enforces HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'-only. Resets on every response over HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'; removing the header doesn’t clear it — you must serve max-age=0 over HTTPS to disable for reconnecting clients. |
includeSubDomains | No | Applies the policy to every subdomain too. Audit all subdomains first. |
preload | No | Flag opting into the browser preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. list (needs the other two + hstspreload.org). TokenA token is the smallest unit of text (or image/audio/video) an LLM processes — roughly 4 characters, or about ¾ of an English word. A context window is the maximum number of tokens (input plus output) a model can hold at once, like its short-term memory. present, eligible, submitted, and actually listed are four separate states. Near-irreversible once listed. |
Common header values (staging figures below are operational suggestions, not protocol requirements — the hard minimum is the preload row)
| Value | Meaning |
|---|---|
max-age=300 | 5 minutes — a safe first test. |
max-age=31536000 | 1 year — standard resting state. |
max-age=31536000; includeSubDomains | 1 year, all subdomains — strong, non-preload. |
max-age=63072000; includeSubDomains; preload | 2 years + preload — the shape you submit (hstspreload.org’s required minimum is max-age ≥ 31536000). |
max-age=0 (served over HTTPS) | Clears a learned policy for clients that reconnect. Does not remove a preload listing. |
RedirectsA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't.: which one, who sees it
| Redirect | Origin | Who sees it | Job |
|---|---|---|---|
| 301 | Your server | CrawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. and humans | SEO: understand the move, carry link equityPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems. |
| Internal upgrade (often shown as a 307; RFC 6797 doesn’t mandate the exact code) | The browser (HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open.) | Returning humans only — crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see it | Security/UX: skip the insecure first hop |
Fast facts
- Preload requires
max-age≥ 31536000 +includeSubDomains+preload— verified against hstspreload.org’s current published requirements. - Preload removal is a separate submission that takes months to reach users, browser by browser — treat as permanent.
- On an HSTS host, a broken cert = hard-fail, no click-through.
- HSTS is not a ranking signal and does not replace your 301s.
Set the HSTS header
Add the header on your HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' server block only, and start with a short max-age
until you’ve confirmed nothing breaks. Add ; preload only when you intend to
submit to hstspreload.org — it’s close to irreversible.
Apache (.htaccess)
<IfModule mod_headers.c>
# Start short (300s) to prove it's safe; raise to 31536000 once confident.
Header always set Strict-Transport-Security "max-age=300"
# Full posture once every subdomain is verified HTTPS:
# Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
# Only add ; preload when submitting to hstspreload.org:
# Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
</IfModule>Nginx
# On the HTTPS (listen 443) server block:
add_header Strict-Transport-Security "max-age=300" always;
# Full posture once subdomains are verified:
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Preload shape (near-irreversible):
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; Check whether HSTS is set (and read it back)
macOS / Linux
# Print only the Strict-Transport-Security response header
curl -sI https://example.com/ | grep -i strict-transport-security
# → strict-transport-security: max-age=31536000; includeSubDomainsWindows (PowerShell)
# Same check in PowerShell
(Invoke-WebRequest -Uri "https://example.com/" -Method Head).Headers["Strict-Transport-Security"]Inspect and clear an HSTS entry in Chrome (DevTools / net-internals)
If you’re testing and a browser has “learned” an HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. policy you need to clear:
1. Open a new tab and visit: chrome://net-internals/#hsts
2. Under "Query HSTS/PKP domain", enter your host to see the stored policy.
3. Under "Delete domain security policies", enter the host and Delete.
(This clears the *learned* policy — it does NOT remove a *preloaded* domain,
which lives in the browser binary and can't be cleared this way.)Use this to confirm your header is actually being stored, and to reset a test host —
not as a fix for production, where the answer is to actively serve max-age=0 over
HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' (simply removing the header doesn’t clear a policy a client already learned;
it only takes effect once that client reconnects and receives the max-age=0
response).
HSTS mistakes that bite
1. Dropping your 301s because “HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. handles it.” The classic. HSTS’s redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. is a browser-only internal upgrade crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see. Remove your server-side 301s and search engines lose the signal that consolidates your move. Keep both, always.
2. Enabling includeSubDomains before auditing subdomains.
The single most common way to take a subdomain offline. If any subdomain — a legacy
app, a status page, a vendor host, www itself — isn’t on valid HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.', the policy
reaches down and breaks it for every browser that saw the header.
3. Jumping straight to a one-year max-age (or preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch.) on day one.
No safety net. Start short (max-age=300), confirm nothing breaks, then ratchet up.
A long max-age set on a misconfigured site is a self-inflicted outage that lingers
in browsers for a year.
4. Preloading before HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' is genuinely bulletproof. Preload is near-irreversible — removal takes months. Google’s own line: don’t enable HSTS until you’re certain your site operation is robust enough. Preload multiplies that stakes.
5. Treating a lapsed certificate as a minor issue. On a non-HSTS site an expired cert is a bypassable warning. On an HSTS host it’s a hard outage with no click-through. If you enable HSTS, cert renewal automation and expiry alerting stop being nice-to-haves.
6. Setting the header on the HTTP response. Browsers ignore HSTS delivered over HTTP (by design — an attacker could inject or strip it). It must be sent on the HTTPS response to count.
7. Forgetting the wildcard-cert depth limit.
A *.example.com wildcard doesn’t cover foo.bar.example.com. Turn on
includeSubDomains and any deeper subdomain relying on that cert gets locked out.
Incident playbook: an HSTS host is locked out
- Confirm the failure from a clean network and more than one browser. Record the affected hostnames and the exact certificate error. A remembered HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. policy can make the symptom differ between returning and first-time visitors.
- Restore valid HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' first. If the certificate is expired, mismatched, or missing an intermediate, renew or replace it and deploy the complete chain. An HSTS browser will not offer a safe HTTP bypass.
- Map the policy scope. Inspect the live
Strict-Transport-Securityheader and determine whetherincludeSubDomainsor preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. extends the outage beyond the hostname that sent it. - Inventory every affected subdomain. For a forgotten HTTP-only host, put a valid certificate and HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' endpoint in front of it before deciding whether to keep, migrate, or redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. the service.
- Correct the policy only after access is restored. If the scope is unsafe, reduce or remove the header on HTTPS responses. That does not instantly clear a policy already cached by browsers, and preload removal is a separate, slow process.
- Verify recovery. Test the apex,
www, and each affected subdomain for a valid chain, correct hostname, one-hop HTTP→HTTPS redirect, and the intended HSTS header. Keep certificate-expiry monitoring on the same inventory.
Do not tear down the HTTP redirect or tell users to bypass the warning. The durable fix is a valid HTTPS endpoint everywhere the active HSTS policy reaches.
Audit a live HSTS policy
Act as a security-minded technical SEO. Review this Strict-Transport-Security
header, the HTTP redirect response, and the supplied subdomain inventory.
For the header, parse max-age, includeSubDomains, and preload. Explain the effective
scope, identify subdomains whose HTTPS or certificate coverage is unproven, and
separate browser-side HSTS behavior from the server-side 301 search engines need. Use
GET requests (HEAD can behave differently on some servers/clients), and record which
client or tool produced each observation and its version, since internal-redirect
representation is client/tool-specific rather than a fixed protocol value.
Recommend the next rollout stage: keep a short max-age canary, lengthen max-age,
add includeSubDomains, or consider preload. Do not recommend preload unless the
evidence shows a valid certificate, same-host HTTP→HTTPS redirects, HTTPS on every
subdomain, max-age of at least 31536000, includeSubDomains, and the preload token.
Return: observed configuration, risks, blocking evidence, next action, rollback
constraint, and exact validation checks. Triage an HSTS lockout
Given the affected hostnames, browser error, certificate details, DNS/CDN layout,
and live response headers, identify whether this is an expired certificate, hostname
mismatch, incomplete chain, includeSubDomains spillover, or preload issue. Prioritize
restoring valid HTTPS. Explain why removing a header does not immediately erase a
cached browser policy, then provide recovery and verification steps. Patrick's relevant free tools
- Whois / RDAP Lookup — Look up registrar, registration and expiry dates, nameservers, EPP domain-lock statuses, and privacy-redacted registrant information via RDAP.
- DNS Checker — Compare A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, SRV, and PTR answers from Cloudflare and Google to spot DNS propagation differences.
HSTS inspection toolkit
- HTTP Header Checker — inspect the live
Strict-Transport-Securityheader and confirm it appears on HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' responses. curl -I— compare the HTTP redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. with the HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' header without relying on a browser’s remembered HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. state.- Browser DevTools — confirm the final response headers and certificate error seen by a real client.
- HSTS preload status — check submission requirements and whether the domain is already represented in the preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. process.
Use at least two views: command-line output shows the server response, while a browser also exposes client-side enforcement and certificate hard failures. Prefer GET over HEAD when comparing tools — some servers and clients represent the two differently — and note the exact client/tool/version behind every reading.
Staged HSTS rollout tests
Test 0: the state matrix (run this before staging changes)
HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. status isn’t one fact — it’s several independent states that can disagree. Track them separately, per hostname:
| Dimension | What to check | Notes |
|---|---|---|
| Live HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' header, by response class | The Strict-Transport-Security value on real HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' responses (home page, deep pages, API/asset responses can differ) | Use GET, not HEAD — some servers/CDNs vary header emission by method |
| Port-80 redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't. | A genuine server-side redirect exists on port 80, not just reliance on a learned client policy | This is what first-time and non-HSTS clients depend on |
| Certificate coverage | Valid chain for the apex, www, and every subdomain in scope | Wildcard certs don’t cover a second DNS label deep |
| Parent vs. entry-point subdomains | Whether a directly-visited subdomain has actually received its own HSTS response, since it may not inherit a parent’s learned policy the way includeSubDomains implies on paper | Test each entry point directly, not just the apex |
| Learned state, fresh vs. returning client | Behavior on a client that has never seen your header vs. one that has | Clear browser HSTS state (or use a clean profile) to simulate “fresh” |
| Actual preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. status | Whether the domain is listed in a given browser’s shipped build, not just submitted | Check via the browser’s own status page/flag, not just the submission form |
Record the client, tool, and version for every observation — internal-redirect representation and HSTS enforcement details vary across browsers, crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index., and command-line tools, and a stale reading from one client can look like a contradiction that isn’t real.
Test 1: short max-age canary
- Purpose: Prove the header is emitted only from healthy HTTPS responses before committing clients to a long policy.
- Method: Inspect representative templates and hosts with the HTTP Header Checker
and
curl -I; compare the deployed value with the approved canary configuration. - Expected result: HTTPS responses carry the intended short
max-age; HTTP still returns a server-side permanent redirectA 301 redirect is the HTTP status code for a permanent move: it tells browsers and search engines a URL has moved for good, and it's the strongest signal for consolidating a page's ranking signals onto the new URL. Google says permanent redirects don't cause a loss in PageRank. to HTTPS. - Failure trigger: Missing or duplicated headers, an unexpected long duration, certificate errors, or any redirect loopA redirect loop is a chain of redirects that circles back on itself instead of ever reaching a live page — URL A redirects to B and B redirects back to A (or a longer cycle). No page ever returns a 200, so browsers show ERR_TOO_MANY_REDIRECTS and crawlers can't index anything..
- Next action: Fix the header or HTTPS endpoint and keep the rollout at the canary stage.
Test 2: includeSubDomains readiness
- Purpose: Prevent a parent policy from locking out a forgotten hostname.
- Method: Test every DNS hostname in the maintained subdomain inventory for a valid HTTPS response, correct certificate name, and complete chain.
- Expected result: Every in-scope subdomain works over HTTPS, including legacy, vendor, development, and deeper-level hosts.
- Failure trigger: Any HTTP-only service, expired or mismatched certificate, or hostname missing from the inventory.
- Next action: Remediate or relocate the host before adding
includeSubDomains.
Test 3: preload readiness
- Purpose: Verify the near-permanent policy satisfies the documented submission requirements.
- Method: Confirm a valid certificate, same-host HTTP→HTTPS redirects, HTTPS on
all subdomains, and an apex header with
max-ageof at least31536000,includeSubDomains, andpreload. - Expected result: Every requirement passes and the organization accepts the slow removal path.
- Failure trigger: Any failed technical requirement or an unresolved need for an HTTP-only subdomain.
- Next action: Do not submit; remain on the reversible staged policy.
Resources worth your time
My speaking
- Better Safe Than Sorry with HTTPS — SMX East 2016 (SlideShare) — my deep-dive on TLS, common HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' implementation failures, and the migration gotchas that HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. both closes and can amplify. (Standing disclaimer applies: it’s my understanding of these systems, and the adoption stats in it are from 2016.)
My related writing
- The Beginner’s Guide to Technical SEO — where HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' and HSTS fit in the bigger picture.
From around the industry
- Enable HTTPS on your servers (web.dev) — Google’s own HSTS guidance: the header, SSL-stripping, and the hard-fail warning.
- MDN —
Strict-Transport-Security— the authoritative header reference: syntax, directives, and scheme-upgrade behavior. - HSTS Preload List submission (hstspreload.org) — the Chromium project’s preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. requirements and the near-irreversibility caveats.
- RFC 6797 — HTTP Strict Transport Security — the original specification, for when you need the exact wording of a directive.
- HSTS — What It Is and How to Use It (Kinsta) — a practical implementation guide covering the browser-level internal redirectA redirect sends browsers and crawlers from a requested URL to a different one. An HTTP redirect specifically is a 3xx status code paired with a Location header; meta refresh and JavaScript redirects achieve a similar navigation without being a 3xx response themselves. Permanent redirects (301/308) are Google's signal the target should be canonical; temporary ones (302/303/307) aren't., the preload list, and the lock-in risks.
- SSL Labs Server Test (Qualys) — grade your TLS configuration and confirm HSTS is being served correctly.
Stats and hard facts worth citing
- PreloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. requires
max-age≥ 31536000 (1 year),includeSubDomains, andpreload. The exact, non-negotiable submission bar for the browser-baked list. Source - Preload removal takes months to reach users. From the submission service: “inclusion in the preload list cannot easily be undone… it takes months for a change to reach users with a Chrome update.” This is the number that makes preload a one-way door. Source
- HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open. hosts hard-fail on any TLS error. web.dev: clients that know your site as an HSTS host “are likely to hard-fail if your site ever has an error in its TLS configuration.” No click-through — a lapsed cert becomes an outage. Source
- HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' itself is “a very lightweight signal—affecting fewer than 1% of global queries.” Google’s own framing — and HSTS is a layer on top of HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.', not a separate ranking input, so its SEO weight is effectively zero. Right-size expectations accordingly. Source
Test yourself: HSTS
Five quick questions on HSTSHSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open.. Pick an answer for each, then check.
HSTS
HSTS (HTTP Strict Transport Security) is a response header that tells browsers to always connect to your site over HTTPS — even when a user types or clicks an http:// link — closing the insecure-first-request gap that a plain 301 redirect leaves open.
Related: HTTPS
HSTS
HSTS — HTTP Strict Transport Security — is a security policy delivered as the Strict-Transport-Security response header, honored only when it arrives over a secure connection, and stored per-client for a set max-age period as that browser’s own future policy for the site (a header sent over plain HTTP is ignored). Once a browser has learned the header, it upgrades any http:// request to https:// itself, before a single insecure byte leaves the machine. web.dev frames its purpose plainly: it lets you “avoid the cost of the 301 redirectA 301 redirect is the HTTP status code for a permanent move: it tells browsers and search engines a URL has moved for good, and it's the strongest signal for consolidating a page's ranking signals onto the new URL. Google says permanent redirects don't cause a loss in PageRank.” and “defeats attacks like SSL Stripping.”
The header takes three directives: max-age (how long, in seconds, to remember the policy — removing the header doesn’t clear a learned policy; you must actively serve max-age=0 over HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.'), the optional includeSubDomains (apply it to every subdomain too), and the optional preload (a flag that’s a prerequisite for — but not the same as — actually being submitted to and listed on the browser-baked preloadResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. list at hstspreload.org).
For SEO, one distinction matters most. When a browser enforces HSTS it rewrites the URI to HTTPSHTTPS is the encrypted version of HTTP — it uses TLS to authenticate the server and protect data in transit between a browser and a website. Google announced it as a lightweight ranking signal in 2014 and today conditionally prefers HTTPS pages as canonical; Chrome marks plain HTTP pages 'Not Secure.' internally, before any request reaches a server — RFC 6797 doesn’t mandate a specific status code for that internal rewrite, though it’s often shown as a 307 by browsers and tools — and that rewrite happens inside the browser, where crawlersA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. never see it either way. Search engines still need your real, server-side 301 to understand the protocol move and consolidate link equityPageRank is Google's original recursive link-graph algorithm: a page's score depends on the scores of the pages linking to it, and in the published model each page's score is split across its outbound links (the simplified version: links are weighted votes). Google says it's evolved since launch but still part of its core ranking systems.. HSTS sits on top of your 301s; it does not replace them, and it has no influence on Google’s canonical-URL selection.
The other thing to respect is that HSTS is deliberately unforgiving. A browser that knows your site as an HSTS host will hard-fail — no click-through — if your certificate ever breaks. Preloading amplifies that: removal from the list is a separate, slow submission process that takes months to reach users browser by browser, so you enable it only once you’re certain HTTPS is rock-solid across every subdomain.
Related: HTTPS
Build-time retrieval analysis plus live signals for this exact article. The automatic chunk report includes a deterministic readiness score and is ready without a model download.
Search Console
sampleGA4 traffic (28d)
sampleCloudflare traffic (7d)
sampledCrUX field data (28d, phone)
sampleGoogle NLP entities
localChangelog
Revision history
Compare the published article with an archived editorial snapshot. Added and removed words are shown only after you open a comparison.
Updated Jul 17, 2026.
Editorial summary and recorded change details.Summary
Clarified protocol requirements versus operational advice and expanded state-based validation.
Change details
-
Added a four-state preload model distinguishing token presence, eligibility, submitted-pending status, and actual browser-list inclusion.