HSTS Preload: How to Get on the List (and Off It)
The Strict-Transport-Security header (HSTS) tells a browser to only ever connect to your site over HTTPS. It has one gap: the browser has to see the header once before it applies, so the very first visit can still start over plain HTTP. HSTS preload closes that gap. Your domain is added to a list built into Chrome, Firefox, Safari and Edge, so browsers use HTTPS for it from the first request. It is a strong protection, and a hard one to undo, so it is worth understanding before you submit.
How HSTS Preload Works
- You send an HSTS header that meets the preload requirements.
- You submit your domain at
hstspreload.org. - The domain is added to the Chromium preload list, which other browsers also use.
- With each browser release, the list ships inside the browser. From then on, the browser will not connect to your domain or any subdomain over HTTP, even on a first visit, even if someone types
http://.
Without HSTS preload, an attacker on the same network, such as public Wi-Fi, can intercept that first HTTP request and keep the visitor on an insecure connection. This is called SSL stripping. The general role of HSTS is covered in the security headers guide. This article is about the preload step.
HSTS Preload Requirements
To be accepted, the domain must:
- Serve a valid certificate.
- Redirect HTTP to HTTPS on the same host, if it listens on port 80.
- Serve all subdomains over HTTPS, including
wwwif it exists in DNS. - Send this header on the base domain over HTTPS:
| Directive | Requirement |
|---|---|
max-age | At least 31536000 (one year). Two years (63072000) is the common choice. |
includeSubDomains | Required. Every subdomain will be forced to HTTPS. |
preload | Required. Signals consent to be added to the list. |
If the base domain redirects (for example example.com to www.example.com), the redirect response itself must include the HSTS header. Only registrable domains such as example.com can be submitted, not individual subdomains.
Check This Before You Submit
HSTS preload applies to every subdomain, for every visitor, for a long time. Before you submit, make sure nothing on your domain needs plain HTTP:
- Internal and legacy subdomains, such as an intranet, a printer admin page, a staging box or an old marketing microsite without a certificate.
- Third-party services on your subdomains, such as a help desk, status page or email tracking links, that may not support HTTPS on your custom domain.
- Development setups that use real subdomains of your production domain.
A safe rollout is to deploy the header with includeSubDomains and a short max-age such as 300 seconds, watch for problems, raise it step by step to a week, a month and then two years, and only then add preload and submit. Certificate Transparency logs and your DNS export help you list every subdomain. The SSL checker confirms each one serves a valid certificate.
Getting Off the List Is Slow
You can request removal at hstspreload.org, but removal also has to ship in browser releases, and users have to update their browsers. In practice it can take months before a removal reaches most users. During that time, any subdomain that cannot serve HTTPS is unreachable. This is why HSTS preload is recommended for domains that are fully committed to HTTPS, which today is most public websites, but not for domains with HTTP-only services you cannot fix.
How to Check Your HSTS Preload Status
Enter your domain at hstspreload.org to see whether it is preloaded, pending or eligible, and what is missing. A security scan checks this too: it reads your HSTS header, flags a missing or short max-age and a missing preload directive, and looks up your domain's status on the preload list, so you can see in one report whether the header is ready and whether the domain is actually listed. The security headers checker shows the raw header your server sends.
Common HSTS Preload Mistakes
- Adding
preloadwithout submitting. The directive alone does nothing. You must submit the domain. - Sending the header only on
www. The base domain must send it too. - Setting the header in the app but not on redirects, so the first response a visitor gets has no HSTS.
- Submitting before checking subdomains and breaking an internal tool.
- Removing the header after preloading. You stay on the list until removal is requested and shipped, and dropping the header can block your domain from staying listed.
Summary
HSTS preload makes browsers use HTTPS for your domain and all its subdomains from the very first request. Send max-age of at least a year with includeSubDomains and preload, confirm every subdomain works over HTTPS, then submit. For setup examples, see how to fix missing security headers.
Perguntas frequentes
HSTS preload is a list of domains built into major browsers that are always loaded over HTTPS, including on the very first visit. You add your domain by meeting the requirements and submitting it at hstspreload.org.
A valid certificate, an HTTP to HTTPS redirect, HTTPS on all subdomains, and a Strict-Transport-Security header on the base domain with max-age of at least 31536000, includeSubDomains and preload.
No. The preload directive only signals consent. You also have to submit the domain at hstspreload.org and wait for it to ship in browser releases.
Removal has to ship in browser updates and reach users, so it often takes months. Plan as if preloading is permanent.
Most public sites that are fully on HTTPS can. Avoid it if any subdomain must stay on plain HTTP, such as legacy internal tools or third-party services that cannot use HTTPS on your domain.
Related reading
Website Security Headers Explained: The Complete Checklist
CSP, HSTS, X-Frame-Options, and every other HTTP security header your site should ship - with copy-pasteable examples.
How to Fix Missing Security Headers
Why missing or weak HTTP security headers leave otherwise-secure code exposed, and how to configure HSTS, CSP, and the rest correctly.
SSL/TLS Certificate Errors Explained: A Troubleshooting Guide
Expired certs, name mismatches, incomplete chains, and mixed content warnings - what each browser error actually means and how to fix it.
How to Add Security Headers in Next.js
Next.js ships with almost no security headers by default. Here is how to add Next.js security headers in next.config, set a nonce-based CSP in proxy.ts, and verify the result.
How to Fix Mixed Content Warnings
Why an HTTPS page loading even one resource over plain HTTP triggers browser warnings and breaks the padlock, and how to find and fix every instance.
Security Headers Checker
See the HSTS header your server actually sends.
Security Scan
Checks HSTS settings and your preload list status.
Find out which headers you're missing
Run a free security scan and get a plain-English breakdown of every header, cert, and exposed secret.
Run a free security scan