On this page
What this issue is
HSTS stands for HTTP Strict Transport Security. Your server sends a header such as Strict-Transport-Security: max-age=31536000 on https responses. A browser that sees it remembers, for that many seconds, to turn any http request for your domain into https before sending it.
Without it, someone typing yourdomain.com or clicking an old http link first makes an insecure request, and your server then redirects them. HSTS removes that first insecure hop for returning visitors.
Common misconfigurations: the header is absent; max-age is tiny (such as 0 or 300), so the browser forgets it quickly; the header is sent over plain http, where browsers ignore it; includeSubDomains is set while some subdomain still lacks a valid certificate; or preload is added without meeting the requirements.
Why it costs you leads or sales
The direct impact is usually low. HSTS is a security and hygiene signal, not a ranking switch. But it matters in a few ways: it cuts the extra http-to-https redirect for returning visitors, it protects people on public Wi-Fi from having that first request tampered with, and it keeps security scanners and procurement checks from flagging your site.
The bigger risk is the opposite mistake. If you turn on a long max-age with includeSubDomains and a subdomain (a booking tool, a landing page host, a help centre) has no valid https, browsers will refuse to load it at all, with no way for the visitor to click through. That can quietly kill a form or checkout on that subdomain.
- Visitor opens linkOld http link or typed domain
- Insecure first requestNo HSTS, so http is tried first
- Subdomain on bad httpsincludeSubDomains cached, certificate invalid
- Booking or form pageBrowser refuses to load it
- Lead or saleNever reached
A subdomain without valid https is blocked once includeSubDomains is cached by the browser.
How to check if your site has it
You are looking for the Strict-Transport-Security header on the https response of your main domain, and on www if you use it.
Request the headers
Run
curl -sI https://yourdomain.comin a terminal and look for a line startingstrict-transport-security.Or use the browser
Open DevTools, go to the Network tab, reload, click the first document request and read Response Headers.
Check the value
Note max-age (in seconds), and whether includeSubDomains or preload appear.
Check every host
Repeat for www, the bare domain and any subdomain that serves pages or forms.
Confirm the header is on https only
It should appear on https responses. Browsers ignore it on plain http.
curl -sI https://yourdomain.com | grep -i strict-transport-security
# Expected, for example:
# strict-transport-security: max-age=31536000; includeSubDomains| What you see | Meaning | Action |
|---|---|---|
| No header | HSTS missing | Add it with a short max-age first |
| max-age=0 | Policy is switched off | Raise it once https is stable |
| max-age under about 86400 | Browser forgets quickly | Increase in stages |
| includeSubDomains present | Applies to all subdomains | Confirm each has valid https |
| preload present | Intended for the preload list | Check you meet the requirements |
How to fix it
First make sure https works everywhere: a valid certificate on the bare domain, www and every subdomain, and http redirecting to https. Then add the header. Where you add it depends on your platform.
Prefer a server-level setting
On Apache add the header in
.htaccess(snippet below); on nginx use the server block. Some hosts also offer an HSTS toggle in their dashboard or CDN.Or use a security plugin
Some security and SSL plugins have an HSTS option. Check the max-age they set and whether includeSubDomains is on.
Start with a short max-age
Use 300 to 86400 seconds first, then raise it after testing.
Check what Shopify already sends
Shopify serves stores over https with its own certificates. Run the curl check on your primary domain to see the current header.
Know the limit
You generally cannot edit response headers from the theme. If you need a specific policy, put a CDN or proxy you control in front, or accept the platform default.
Not applicable
GTM runs in the browser and cannot set HTTP response headers. HSTS has to come from the server, CDN or host.
Look in Hosting settings
Open Site settings, then Hosting. Webflow offers an option to enable HSTS for the site on some plans; turn it on after confirming SSL is active.
Mind subdomains
Only include subdomains if all of them are on valid https.
Check the header on your funnel domain
Run the curl check on each custom domain. If the platform does not let you edit headers, front the domain with a CDN where you can add a response header rule.
Check the current header
Wix manages https and headers for you. Use the curl check to see what is sent; custom response headers are generally not editable.
Confirm SSL is on
In Settings, then Advanced, then SSL, make sure SSL is Secure. Squarespace controls response headers, so check with curl rather than expecting a setting to edit.
Add the header on https responses
Use the nginx or Apache snippets below, or set it in your CDN or load balancer rules.
Reload and test
Reload the server config, then run the curl check on every host.
add_header Strict-Transport-Security "max-age=86400" always;<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=86400"
</IfModule>Fix https first
Valid certificates on every host and http redirecting to https.
Start with a short max-age
For example 86400 (one day) without includeSubDomains.
Test key journeys
Load your forms, checkout, booking pages and any subdomains.
Raise max-age in stages
Move to a week, a month, then 31536000 (one year).
Add includeSubDomains only when ready
Every subdomain, including old and third-party hosted ones, must serve valid https.
Treat preload as a separate decision
Preload is hard to undo. Read the requirements on hstspreload.org before adding the preload token.
Before
- No Strict-Transport-Security header
- First visit can start on http
- Or max-age=0 / a few seconds
After
- Header sent on every https response
- Browsers upgrade to https automatically
- max-age raised in stages after testing
How to confirm it's fixed
- curl -sI shows strict-transport-security on the bare domain and www
- max-age is the value you intended
- includeSubDomains is present only if every subdomain has valid https
- Forms, checkout and booking pages still load on all hosts
- http still redirects to https
- A browser that visited before now upgrades http links to https without a request to http (DevTools shows an internal 307 redirect)
How to prevent it happening again
- Keep the header in server or CDN config, not in a one-off manual change
- Re-run the curl check after a hosting move, CDN change or domain change
- Before adding a new subdomain, issue its certificate first if includeSubDomains is on
- Add certificate expiry dates to a calendar or monitor them
- Document the chosen max-age and who can change it
How FunnelGuard handles this
FunnelGuard does not check HSTS yet. It is a possible future check. Today FunnelGuard runs your real customer journeys (lead forms, checkouts, booking and chat buttons) on a schedule from the EU or the US, so if a bad HSTS or https setup stops a page or form from loading, a failed step would show up in the journey, with a screenshot and a likely cause. That tells you something broke, not that HSTS is the reason by name.
To watch for HSTS itself, run the curl -sI check after every hosting, CDN or domain change, or use a free online header scanner on a schedule that suits you. You can also start with the free FunnelGuard plan (1 site, 2 journeys, daily checks, no card) to watch the journeys that matter most.
Questions people ask
What is HSTS and do I need it?
HSTS is the Strict-Transport-Security response header that tells browsers to use only https for your domain. You do not strictly need it for your site to work, but it is a recommended security setting and removes the insecure first http request for returning visitors.
Why is my HSTS header not showing?
The header may not be set at all, or it is only sent on http responses, where browsers ignore it. Check with curl -sI https://yourdomain.com and make sure your server, CDN or host adds it to https responses, including for www.
Does HSTS help SEO?
Not directly as a ranking factor. It helps by making sure visitors and crawlers reach the https version quickly and by reducing redirects for returning browsers, but it works best alongside correct redirects and a valid certificate.
What max-age should I use for HSTS?
Start with a short value such as 86400 (one day) while you test, then raise it in stages to 31536000 (one year). A long value is the usual goal, but it should only be set once https works on every host.
Is includeSubDomains safe to add?
Only if every subdomain, including old ones and ones hosted by third parties, serves valid https. If one does not, browsers will refuse to load it and visitors cannot click through the warning.
How do I remove HSTS if it broke my site?
Serve the header with max-age=0 over valid https so browsers drop the policy the next time they see it. Visitors who cached it will only clear it after receiving that header, so fix https first. Preloaded domains need a separate removal request.
Should I use HSTS preload?
Only if you are sure all your subdomains will stay on https long term. Preload puts your domain in lists shipped with browsers, and removal is slow. Review the requirements on hstspreload.org before adding it.
Does FunnelGuard check HSTS?
No, not yet. It is a possible future check. FunnelGuard does run your key journeys on a schedule, so a page that fails to load because of a bad https setup would show as a failed step, but you should check the header itself manually with curl.
Related issues
- SEO-083http not redirecting to httpsFix guide
- SEO-091SSL certificate expired or invalidFix guide
- SEO-092SSL certificate about to expireFix guide
- SEO-093Certificate name mismatch on www or a subdomainFix guide
- SEO-094Mixed content on https pagesFix guide
- SEO-096Old TLS versions only, modern crawlers fail handshakeFix guide