<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HSTS preload &#8211; SSL证书知识</title>
	<atom:link href="https://www.sslgood.com/tags/hsts-preload/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sslgood.com</link>
	<description>SSL证书知识</description>
	<lastBuildDate>Thu, 03 Dec 2026 15:33:38 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>HSTS Preload List Submission: Requirements, Steps, and Verification</title>
		<link>https://www.sslgood.com/hsts-preload-list-submission-requirements-steps-and-verification/</link>
		
		<dc:creator><![CDATA[sslgood]]></dc:creator>
		<pubDate>Thu, 03 Dec 2026 15:33:38 +0000</pubDate>
				<category><![CDATA[基础知识]]></category>
		<category><![CDATA[APACHE]]></category>
		<category><![CDATA[HSTS]]></category>
		<category><![CDATA[HSTS preload]]></category>
		<category><![CDATA[hstspreload.org]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[NGINX]]></category>
		<category><![CDATA[TLS]]></category>
		<guid isPermaLink="false">https://www.sslgood.com/hsts-preload-list-submission-requirements-steps-and-verification/</guid>

					<description><![CDATA[HSTS preload list submission: hstspreload.org requirements, nginx/Apache headers, status API checks, common errors, timelines, and removal steps.]]></description>
										<content:encoded><![CDATA[<h2>What Is HSTS Preload List Submission and Why Does It Fix the First-Visit Gap?</h2>
<p>HSTS is trust-on-first-use, and that is precisely the weakness. Per RFC 6797 §8.1, a user agent must ignore a <strong>Strict-Transport-Security</strong> header that arrives over insecure transport, so the policy only takes hold after one clean HTTPS response. Everything before that — the typed http:// URL, an old bookmark, a cached link, or an attacker stripping the upgrade — reaches your origin in plaintext. HSTS preload list submission closes that window by hardcoding your domain in the browser&#8217;s static list, so the scheme is rewritten before a single packet leaves the machine.</p>
<p>Chromium compiles the list from <strong>net/http/transport_security_state_static.json</strong> and consults it during navigation, before DNS resolution; Firefox consumes the same dataset through its own nsSTSPreloadList. Chromium also pushes list updates via the component updater, so a newly accepted entry can reach users between major releases. You can confirm both the header and your shipped entry without a GUI:</p>
<pre><code># 1. What is the origin actually sending? (-I = headers only)
curl -sI https://example.com | grep -i strict-transport-security
# Expected: strict-transport-security: max-age=63072000; includeSubDomains; preload

# 2. Is the domain already in Chromium's list? (grep the upstream JSON)
curl -s https://raw.githubusercontent.com/chromium/chromium/main/net/http/transport_security_state_static.json 
  | grep -n '"example.com"'          # mode should read "force-https"
</code></pre>
<p>Preload is a domain policy list, not a CA signal. It issues no certificates, replaces no redirects, and does nothing for mixed content: you still need a chain the browser trusts and a 301 from http to https on the same host, which is exactly what hstspreload.org validates. Submit a site without that redirect and the checker returns errors such as “Error: No redirect from HTTP to HTTPS” or “Error: max-age is less than 31536000”.</p>
<p>The preload token is not defined in RFC 6797 — it is a marker consumed by hstspreload.org and the list maintainers, which is why the checker demands the full string <strong>max-age=31536000; includeSubDomains; preload</strong>. The floor is 31536000 seconds (365 days); 63072000 (two years) is the commonly recommended value.</p>
<table>
<tr>
<th>Header value</th>
<th>First visit protected?</th>
<th>Subdomains covered?</th>
<th>Undo cost</th>
</tr>
<tr>
<td>max-age=31536000</td>
<td>No</td>
<td>No</td>
<td>Wait one year or send max-age=0</td>
</tr>
<tr>
<td>max-age=31536000; includeSubDomains</td>
<td>No</td>
<td>Yes, after first visit</td>
<td>Per-host header change</td>
</tr>
<tr>
<td>max-age=63072000; includeSubDomains; preload</td>
<td>Yes, once in a browser release</td>
<td>Yes, including future hosts</td>
<td>Removal request + months of propagation</td>
</tr>
</table>
<p>Submission itself is free; the budget is TLS certificates (Let&#8217;s Encrypt $0; commercial DV typically $10–$100/year, OV $50–$300/year per CA pricing) plus engineering time to audit every subdomain. The risk is asymmetric: includeSubDomains forces HTTPS for every current and future host, so an internal <em>legacy.example.com</em> that only speaks HTTP breaks for users until you fix it or file a removal at hstspreload.org/removal.</p>
<h2>What Are the HSTS Preload List Submission Requirements at hstspreload.org?</h2>
<p>hstspreload.org doesn&#8217;t negotiate: it runs a fixed checklist against the exact hostname you submit, and any single failure leaves your domain in <code>pending</code> or bounced back as <code>unknown</code>. The authoritative list of checks lives in the Chromium HSTS preload documentation at hstspreload.org, and the underlying header semantics are defined in RFC 6797 §6.1. Before you submit, run the same tests locally so the checker has nothing to complain about:</p>
<pre><code># 1) Valid HTTPS + full chain on the apex AND every subdomain (repeat per host: www, api, static, ...)
openssl s_client -connect example.com:443 -servername example.com -verify_return_error &lt;/dev/null
# "Verify return code: 0 (ok)" is the only acceptable result

# 2) HTTP must redirect to HTTPS on the SAME host with a 301
curl -sI http://example.com | head -n 5
# Expect: HTTP/1.1 301 Moved Permanently
#         Location: https://example.com/     &lt;-- NOT https://www.example.com/

# 3) The header must appear on the base domain&#039;s HTTPS response
curl -sI https://example.com | grep -i strict-transport-security
# Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

# 4) Inventory subdomains from Certificate Transparency before claiming includeSubDomains
curl -s &quot;https://crt.sh/?q=%25.example.com&amp;output=json&quot; 
  | jq -r &#039;.[].name_value&#039; | tr &#039;,&#039; &#039;n&#039; | sort -u</code></pre>
<p>The 31536000-second floor (one year) is a hstspreload.org policy, not a protocol rule — RFC 6797 §6.1.1 merely recommends a &#8220;reasonable&#8221; max-age and explicitly allows shorter values, which is why a site can be perfectly RFC-compliant and still be rejected. The same applies to <code>includeSubDomains</code> and <code>preload</code>: both are optional per the RFC, both are mandatory for the list.</p>
<table>
<thead>
<tr>
<th>Requirement</th>
<th>What the checker verifies</th>
<th>Source / default</th>
</tr>
</thead>
<tbody>
<tr>
<td>max-age</td>
<td>≥ 31536000 seconds (1 year)</td>
<td>hstspreload.org policy; RFC 6797 §6.1.1 only recommends &#8220;long&#8221;</td>
</tr>
<tr>
<td>includeSubDomains</td>
<td>Present on the submitted host&#8217;s header</td>
<td>Optional in RFC 6797; required for preload</td>
</tr>
<tr>
<td>preload token</td>
<td>Present on the exact host you submit (apex header if you submit <code>example.com</code>)</td>
<td>hstspreload.org policy</td>
</tr>
<tr>
<td>HTTP→HTTPS redirect</td>
<td>301 on the same host, not a cross-host hop to <code>www</code></td>
<td>Reported as &#8220;HTTP redirects to a different host&#8221;</td>
</tr>
<tr>
<td>Subdomain coverage</td>
<td>Every name under the domain resolves and serves valid HTTPS</td>
<td>Consequence of <code>includeSubDomains</code></td>
</tr>
</tbody>
</table>
<p>The subdomain rule is where most submissions die, because wildcard DNS quietly publishes names nobody meant to expose: <code>*.example.com</code> makes <code>dev</code>, <code>staging</code>, and <code>vpn</code> publicly resolvable, and each one must then present a valid certificate or the whole domain is ineligible — and after preload lands, a broken subdomain becomes an unrecoverable interstitial for real users. Common rejection strings from the checker include <code>max-age must be at least 31536000 seconds</code>, <code>includeSubDomains must be specified</code>, and <code>preload must be specified</code>; a missing or mismatched certificate surfaces as <code>SSL error</code> or <code>No HSTS header</code>.</p>
<p>There is no fee and no account for hsts preload list submission, but also no SLA: hstspreload.org is a volunteer-maintained Chromium project, so a correct submission can sit at <code>pending</code> for weeks until a browser release ships the list, and removal afterward takes months — treat the <code>preload</code> token as a one-way commitment and stage it behind a canary hostname first.</p>
<h2>How Do You Complete HSTS Preload List Submission Step by Step?</h2>
<p>Start with an inventory, because the preload checker validates <em>every</em> hostname under the name you submit. Pull certificate transparency names, then compare against your DNS zone to catch hosts that only exist in DNS:</p>
<pre><code>curl -s 'https://crt.sh/?q=%25.example.com&amp;output=json' 
  | jq -r '.[].name_value' | tr 'n' 'n' | sort -u &gt; hosts.txt
# Probe each name: any 000/5xx or surviving http:// URL breaks preload eligibility
for h in $(cat hosts.txt); do
  curl -sS -o /dev/null -w '%{http_code} %{url_effective}n' "https://$h"
done</code></pre>
<p>A line like <code>000 https://old.example.com</code> (DNS failure) or <code>200 http://intranet.example.com/</code> (no HTTPS redirect) is exactly what hstspreload.org reports back as &#8220;Hosts that do not support HTTPS&#8221;. Fix or remove those names first.</p>
<p>Next, stage <code>max-age</code> so a bad header does not brick your site. RFC 6797 §6.1.1 defines the directive; the <code>preload</code> token is a browser-vendor convention, not part of the RFC, and it is what makes the entry irreversible until a removal ships. Leave it off until the final flip:</p>
<table>
<thead>
<tr>
<th>Stage</th>
<th>Header value</th>
<th>Duration</th>
<th>Rollback window</th>
</tr>
</thead>
<tbody>
<tr>
<td>1 – smoke test</td>
<td><code>max-age=300</code></td>
<td>5 min</td>
<td>Immediate (clear HSTS in browser)</td>
</tr>
<tr>
<td>2 – soak</td>
<td><code>max-age=86400; includeSubDomains</code></td>
<td>24 h</td>
<td>~1 day</td>
</tr>
<tr>
<td>3 – submission</td>
<td><code>max-age=31536000; includeSubDomains; preload</code></td>
<td>1 year</td>
<td>None once preloaded</td>
</tr>
</tbody>
</table>
<p>Deploy at every edge — origin, CDN, load balancer, WAF — because a single layer stripping the header silently invalidates the submission. Nginx: <code>add_header Strict-Transport-Security "max-age=300" always;</code> (the <code>always</code> flag matters for error responses). Apache 2.4: <code>Header always set Strict-Transport-Security "max-age=300"</code> with <code>mod_headers</code> enabled. Purge caches, then confirm from two different networks:</p>
<pre><code>curl -sI https://example.com | grep -i '^strict-transport-security'
# strict-transport-security: max-age=31536000; includeSubDomains; preload</code></pre>
<p>Now use the form at hstspreload.org: enter the apex (<code>example.com</code>) or one exact host, tick <code>includeSubDomains</code>, and submit. The site runs live checks and returns specific errors — &#8220;max-age must be at least 31536000&#8221;, &#8220;missing includeSubDomains&#8221;, &#8220;redirects to HTTP&#8221;, &#8220;no HSTS header&#8221;. Record the submission date, then poll the API:</p>
<pre><code>curl -s 'https://hstspreload.org/api/v2/status?domain=example.com' | jq .
# {"status":"pending","domain":"example.com"}</code></pre>
<ul>
<li><code>unknown</code> — not submitted, or checks still failing.</li>
<li><code>pending</code> — queued; your hsts preload list submission is accepted but not enforced in any browser yet.</li>
<li><code>preloaded</code> — shipped in the Chromium list (see <code>transport_security_state_static.json</code>); Firefox uses its own <code>nsSTSPreloadList</code>, Safari and Edge ingest independently.</li>
<li><code>removed</code> — deletion merged; expect months for clients to catch up.</li>
</ul>
<p>Chromium milestones land roughly every 4–6 weeks, so re-test after the next release on a clean profile with <code>chrome://net-internals/#hsts</code> — first-visit protection is never simultaneous across browsers.</p>
<h2>HSTS Preload List Submission Config Examples for Nginx, Apache, Caddy, and Cloudflare</h2>
<p>Getting the header right on the wire is the whole game: hstspreload.org rejects any submission whose <code>Strict-Transport-Security</code> value lacks <code>includeSubDomains</code> or sets <code>max-age</code> below <code>31536000</code> (one year), per the submission requirements on hstspreload.org. RFC 6797 §6.1 defines the header itself, and the <code>preload</code> token is the non-standard marker the list maintainers look for. Here is the exact configuration for each common edge, with the version traps that silently break the header.</p>
<p><strong>Nginx 1.25.1+</strong> — note that <code>add_header</code> inside any <code>location</code> block discards all inherited <code>add_header</code> directives from the <code>server</code> block, so keep HSTS at server level or repeat it:</p>
<pre><code>server {
  listen 443 ssl;
  http2 on;                 # nginx 1.25.1+; older: listen 443 ssl http2;
  server_name example.com;
  ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;  # 'always' needs nginx 1.7.5+
}
server {
  listen 80;
  server_name example.com;
  return 301 https://$host$request_uri;
}</code></pre>
<p><strong>Apache 2.4 with mod_headers</strong> — confirm the module first with <code>apachectl -M | grep headers</code>, which must print <code>headers_module (shared)</code>. Use <code>always</code> so the header is emitted on error responses too:</p>
<pre><code>&lt;VirtualHost *:443&gt;
  ServerName example.com
  SSLEngine on
  SSLCertificateFile      /etc/letsencrypt/live/example.com/fullchain.pem
  SSLCertificateKeyFile   /etc/letsencrypt/live/example.com/privkey.pem
  Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
&lt;/VirtualHost&gt;
&lt;VirtualHost *:80&gt;
  ServerName example.com
  Redirect permanent / https://example.com/
&lt;/VirtualHost&gt;</code></pre>
<p><strong>Caddy v2</strong> — automatic HTTPS and the HTTP→HTTPS redirect are built in, but HSTS is not, so the directive is mandatory for hsts preload list submission:</p>
<pre><code>example.com {
  header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
}</code></pre>
<p><strong>Cloudflare</strong> — SSL/TLS → Edge Certificates → HSTS: set Max-Age to 12 months (31536000), enable <em>Include subdomains</em> and <em>Preload</em>. Cloudflare&#8217;s default is 6 months (15552000), which fails the preload minimum, so change it explicitly.</p>
<table>
<tr>
<th>Platform</th>
<th>Mechanism</th>
<th>Version / default</th>
<th>Common failure</th>
</tr>
<tr>
<td>Nginx</td>
<td><code>add_header … always</code></td>
<td>1.7.5+; <code>http2 on</code> 1.25.1+</td>
<td>Overridden by <code>location</code>-level <code>add_header</code></td>
</tr>
<tr>
<td>Apache</td>
<td><code>Header always set</code></td>
<td>mod_headers (2.4)</td>
<td>Module not loaded; missing <code>always</code></td>
</tr>
<tr>
<td>Caddy</td>
<td><code>header</code> directive</td>
<td>v2</td>
<td>Assumed automatic — it isn&#8217;t</td>
</tr>
<tr>
<td>Cloudflare</td>
<td>Dashboard toggle</td>
<td>Default 15552000</td>
<td>Default max-age below one year</td>
</tr>
</table>
<p>Because a preloaded domain has no click-through fallback, expiry becomes a hard TLS error. Let&#8217;s Encrypt certificates last 90 days per Let&#8217;s Encrypt docs, so verify automation with <code>sudo certbot renew --dry-run</code> and confirm the systemd timer with <code>systemctl list-timers | grep certbot</code> before you ever submit.</p>
<h2>HSTS Preload List Submission vs HSTS Header: Comparison Table</h2>
<p><strong>Is an HSTS preload list submission actually different from just sending the <code>Strict-Transport-Security</code> header?</strong> Yes — the header is a promise made <em>after</em> a connection succeeds, while the preload list is a promise the browser ships with. The comparison below is the one that matters when you are deciding how much operational risk to take on.</p>
<table>
<thead>
<tr>
<th>Mechanism</th>
<th>First-visit protection</th>
<th>Where configured</th>
<th>Rollback speed</th>
<th>Requirements</th>
</tr>
</thead>
<tbody>
<tr>
<td>HSTS header only</td>
<td>No — only after the first successful HTTPS response</td>
<td>Origin or CDN response header</td>
<td>Fast: serve <code>max-age=0</code></td>
<td>Valid HTTPS, one header</td>
</tr>
<tr>
<td>HSTS preload list submission</td>
<td>Yes — before the first request leaves the device</td>
<td>hstspreload.org, baked into browser binaries</td>
<td>Slow: months (removal + release cycles)</td>
<td><code>max-age</code> ≥ 31536000 (1 year), <code>includeSubDomains</code>, <code>preload</code>, every subdomain on HTTPS</td>
</tr>
<tr>
<td>HTTP→HTTPS redirect</td>
<td>No — the plaintext request is already on the wire and can be stripped</td>
<td>Web server / CDN rule</td>
<td>Fast</td>
<td>301 or 302</td>
</tr>
<tr>
<td>HPKP</td>
<td>N/A</td>
<td>Deprecated response header</td>
<td>N/A</td>
<td>Removed in Chrome 72</td>
</tr>
</tbody>
</table>
<p>The gap in row one is real: a header-only policy does nothing for an API client that has never talked to you, a captive portal that injects into plaintext, or a user typing <code>example.com</code> into a freshly installed browser. Per <a href="https://www.rfc-editor.org/rfc/rfc6797">RFC 6797</a>, a UA with no cached STS state is free to attempt <code>http://</code> first. That is precisely the window an HSTS preload list submission closes — the policy arrives as part of the browser install, so the very first request is already upgraded.</p>
<p>Verify what a client actually sees with two commands. The first reads the header; the second asks the preload API directly:</p>
<pre><code># 1. Inspect the live header (look for max-age, includeSubDomains, preload)
curl -sI https://example.com | grep -i '^strict-transport-security'
# strict-transport-security: max-age=63072000; includeSubDomains; preload

# 2. Query the preload list status (JSON: status, include_subdomains, mode)
curl -s 'https://hstspreload.org/api/v2/status?domain=example.com'
# {"status":"preloaded","include_subdomains":true,"mode":"force-https"}

# 3. Confirm the browser's local static list (Chrome)
#    open chrome://net-internals/#hsts → "Query HSTS/PKP domain"
</code></pre>
<p>Rollback asymmetry is the real cost. Removing the header (<code>max-age=0</code>) takes effect once the cached lifetime expires; removing a preloaded domain requires a deletion request at hstspreload.org plus propagation through each browser release — Chrome&#8217;s list ships roughly every four weeks, and users on stale builds keep the pin far longer. If you submit with a 2-year <code>max-age</code> and later need plaintext on a legacy subdomain, you are waiting.</p>
<p><code>includeSubDomains</code> is the sharp edge in the table: header-only deployments can scope the policy by omitting it, but hstspreload.org eligibility requires it, so <em>every</em> subdomain — including that forgotten <code>legacy.internal.example.com</code> — inherits force-HTTPS. Plan a subdomain inventory before you submit. Note also that preload does not replace redirects: keep the <code>301</code> from <code>http://</code> to <code>https://</code> so non-HSTS-aware clients still land on TLS.</p>
<p>HPKP is not a substitute. Chrome 72 removed public key pinning, and the operational failure mode (bricking your own domain for the pin lifetime) is why. Use Certificate Transparency monitoring and <a href="https://www.rfc-editor.org/rfc/rfc8659">CAA records</a> instead, and treat HSTS preloading as the narrower, safer control it is.</p>
<h2>Common HSTS Preload List Submission Errors and Troubleshooting</h2>
<p>If hstspreload.org rejects your hsts preload list submission, the error text usually points straight at the header. The three most common failures are <code>max-age must be at least 31536000</code>, <code>includeSubDomains</code> missing, and <code>preload</code> missing. Per hstspreload.org, the minimum accepted max-age is one year; RFC 6797 §6.1 allows shorter values such as <code>15552000</code> (six months) or <code>86400</code> (one day), but Chromium’s preload list will not accept them.</p>
<table>
<tr>
<th>Error / symptom</th>
<th>Root cause</th>
<th>Fix</th>
</tr>
<tr>
<td><code>max-age must be at least 31536000</code></td>
<td>Header uses 15552000 or 86400</td>
<td>Set <code>max-age=31536000</code> or higher (63072000 is common), purge CDN/edge caches, re-submit</td>
</tr>
<tr>
<td><code>includeSubDomains</code> missing</td>
<td>Apex header lacks the directive</td>
<td>Add <code>includeSubDomains</code> after auditing every subdomain</td>
</tr>
<tr>
<td><code>preload</code> missing</td>
<td>Valid HSTS, but no opt-in token</td>
<td>Append <code>preload</code>; serve it on the apex HTTPS response, not only on <code>www</code></td>
</tr>
<tr>
<td>Redirect fails</td>
<td><code>http://example.com</code> jumps to <code>https://www.example.com</code> or returns HTTP 200</td>
<td>Same-host 301 first, then canonicalize</td>
</tr>
</table>
<p><strong>How do I audit subdomains before adding <code>includeSubDomains</code>?</strong> Preload applies to every name under the apex, so a broken <code>dev</code>, <code>staging</code>, <code>vpn</code>, or wildcard record blocks acceptance. Check DNS and TLS:</p>
<pre><code>dig +short A dev.example.com
curl -sI https://dev.example.com | head -n 5
openssl s_client -connect dev.example.com:443 -servername dev.example.com -verify_return_error &lt;/dev/null
</code></pre>
<p>An expired certificate, a SAN that omits the name, or NXDOMAIN means the preload checker cannot validate the host. Per Let’s Encrypt documentation, every requested name must appear in the certificate’s Subject Alternative Name extension.</p>
<p><strong>Why does the checker fail on <code>http://example.com</code>?</strong> The first redirect must stay on the same host. In nginx, a server-level rule is enough:</p>
<pre><code>server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;  # keeps host; no cross-host jump
}
</code></pre>
<p>Apache equivalent inside <code>&lt;VirtualHost *:80&gt;</code>: <code>Redirect permanent / https://example.com/</code>. Avoid redirecting the apex to <code>www</code> before HTTPS.</p>
<p><strong>Why is the header invisible?</strong> CDNs and proxies sometimes strip it, and in nginx an <code>add_header</code> inside a <code>location</code> block replaces the server-level header. Use <code>always</code> (available since nginx 1.7.5) at the correct level, then verify:</p>
<pre><code>add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
curl -sI https://example.com | grep -i strict
</code></pre>
<p>Because preload removal can take months, fix the header and subdomain coverage before your next hsts preload list submission.</p>
<h2>How Do You Verify HSTS Preload List Submission Status?</h2>
<p>Verifying an <strong>HSTS preload list submission</strong> is not one command — it is four independent checks that answer different questions: is the header served on every hostname, does plain HTTP still redirect, is the certificate chain valid, and is the domain actually compiled into Chromium&#8217;s static list. A green header check alone proves nothing about list membership, which is the single most common source of &#8220;I submitted it, why isn&#8217;t it working?&#8221; confusion.</p>
<p><strong>1. Header check.</strong> Per <a href="https://www.rfc-editor.org/rfc/rfc6797#section-6.1">RFC 6797 §6.1</a> the STS header is a semicolon-delimited directive list; <code>preload</code> is a non-standard token defined only by hstspreload.org, and all three directives are mandatory for submission (max-age ≥ 31536000, includeSubDomains, preload).</p>
<pre><code># Apex — expect the full directive set
curl -sI https://example.com | grep -i '^strict-transport-security'
# strict-transport-security: max-age=31536000; includeSubDomains; preload

# Every hostname the policy will cover
for h in example.com www.example.com app.example.com; do
  printf '%-24s ' "$h"
  curl -sI "https://$h" | grep -i '^strict-transport-security' || echo 'MISSING'
done</code></pre>
<p><strong>2. Redirect check.</strong> Preload only upgrades the browser&#8217;s scheme; your origin must still answer port 80 with a 301 to the HTTPS URL.</p>
<pre><code>curl -sI http://example.com | head -n 3
# HTTP/1.1 301 Moved Permanently
# location: https://example.com/

curl -sS -o /dev/null -w '%{http_code} %{redirect_url}n' http://example.com
# 301 https://example.com/</code></pre>
<p><strong>3. TLS check.</strong> <code>-verify_return_error</code> turns chain failures into a non-zero exit, so the check is scriptable; see the <a href="https://docs.openssl.org/master/man1/openssl-s_client/">OpenSSL s_client docs</a>.</p>
<pre><code>openssl s_client -connect example.com:443 -servername example.com -verify_return_error &lt;/dev/null 2&gt;/dev/null | tail -n 2
# Verify return code: 0 (ok)

openssl s_client -connect example.com:443 -servername example.com 2&gt;/dev/null 
  | openssl x509 -noout -dates -subject   # notAfter must outlive your max-age window</code></pre>
<p><strong>4. List status.</strong> The <a href="https://hstspreload.org/">hstspreload.org</a> API is the authoritative answer on whether your <em>hsts preload list submission</em> reached the Chromium list; <code>status</code> is <code>unknown</code> (never submitted), <code>pending</code> (queued for review), or <code>preloaded</code>.</p>
<pre><code>curl -s 'https://hstspreload.org/api/v2/status?domain=example.com' | jq .
# {
#   "status": "preloaded",
#   "include_subdomains": true,
#   "max_age": 31536000,
#   "preload": true
# }</code></pre>
<p><strong>5. Browser check.</strong> Open <code>chrome://net-internals/#hsts</code>, delete the domain&#8217;s <em>dynamic</em> entry first (a locally observed header masks the static state), then query it and look for a static HSTS entry. This reflects the list baked into your Chrome build, not the live server — Chromium ships the list with each release, so propagation typically lags weeks and removal takes months. Automation: <code>testssl.sh --hsts https://example.com</code> or <code>sslyze --http_headers example.com</code>.</p>
<table>
<thead>
<tr>
<th>Check</th>
<th>Proves</th>
<th>Does not prove</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>curl -sI</code> header</td>
<td>Directives served on that host</td>
<td>Anything about the list</td>
</tr>
<tr>
<td><code>curl -sI http://</code></td>
<td>Port 80 still redirects</td>
<td>Subdomain coverage</td>
</tr>
<tr>
<td><code>openssl s_client</code></td>
<td>Chain valid, dates current</td>
<td>HSTS at all</td>
</tr>
<tr>
<td>API v2 <code>status</code></td>
<td>Chromium list membership</td>
<td>That your browser has that list version</td>
</tr>
<tr>
<td><code>chrome://net-internals</code></td>
<td>Effective policy in this build</td>
<td>Other browsers</td>
</tr>
</tbody>
</table>
<p><strong>6. Subdomain sweep.</strong> With <code>includeSubDomains</code>, any HTTP-only host becomes unreachable — catch it before rollout. <code>000</code> means the TLS connection failed outright.</p>
<pre><code>while read -r h; do printf '%-30s ' "$h"; curl -sS -o /dev/null -w '%{http_code}n' "https://$h"; done &lt; hosts.txt</code></pre>
<p>Note that preload state and certificate state are orthogonal: a valid chain with <code>max-age=300</code> will still be rejected at submission, and the header can be perfect while the API reports <code>unknown</code> because you never submitted the apex domain.</p>
<h2>How Long Does HSTS Preload List Submission Take, and How Do You Remove a Domain?</h2>
<p>Short answer: hstspreload.org review is usually hours to a few days, but the HSTS preload list submission only becomes visible after the next Chromium list update—budget weeks, not minutes. A domain can sit in <code>pending</code> until that update ships; Chrome’s stable milestones are about 4 weeks apart in the current schedule (plan ~6 weeks as a conservative buffer), and other browsers that consume the list lag further. Check status with the public API:</p>
<pre><code>curl -s 'https://hstspreload.org/api/v2/status?domain=example.com' | jq -r .status
# pending   # also possible: preloaded, unknown</code></pre>
<table>
<tr>
<td><strong>Stage</strong></td>
<td><strong>Typical wait</strong></td>
<td><strong>Why</strong></td>
</tr>
<tr>
<td>hstspreload.org review</td>
<td>hours–days</td>
<td>checks header, redirects, <code>includeSubDomains</code>, and the <code>preload</code> token</td>
</tr>
<tr>
<td><code>pending</code> → Chromium list</td>
<td>~4–6 weeks</td>
<td>list changes ride the next Chromium milestone</td>
</tr>
<tr>
<td>all shipped browsers</td>
<td>weeks–months</td>
<td>users and downstream browsers update on their own schedule</td>
</tr>
<tr>
<td>Removal</td>
<td>months</td>
<td>a new list must ship; installed browsers keep the old static entry</td>
</tr>
</table>
<p>Removal is the slower direction. Per hstspreload.org’s removal instructions, remove the <code>preload</code> token from your header first, then submit the removal form at <code>https://hstspreload.org/removal/</code>. For nginx:</p>
<pre><code># /etc/nginx/conf.d/hsts.conf
# Drop "preload" first; max-age=0 expires the dynamic HSTS policy.
add_header Strict-Transport-Security "max-age=0" always;

sudo nginx -t &amp;&amp; sudo systemctl reload nginx
curl -sI https://example.com | grep -i '^strict-transport-security'
# Strict-Transport-Security: max-age=0</code></pre>
<p>Do not expect <code>max-age=0</code> to unlock HTTP while the domain is still preloaded: RFC 6797 §6.1.1 lets it clear the cached HSTS policy, but the static preload entry continues to force HTTPS in browsers that already shipped it. Removal from the HSTS preload list is the only reliable rollback for a preloaded domain.</p>
<p>Have a rollback plan: maintain a subdomain inventory, monitor certificate expiry (Let’s Encrypt certificates are 90 days), and automate renewal checks with <code>certbot renew --dry-run</code>—Certbot renews by default when less than 30 days remain.</p>
<pre><code>sudo certbot renew --dry-run
# Congratulations, all simulated renewals succeeded:
#   /etc/letsencrypt/live/example.com/fullchain.pem (success)</code></pre>
<p>A preloaded domain with an expired certificate shows a hard TLS error such as Chrome’s <code>NET::ERR_CERT_DATE_INVALID</code>, not an HTTP fallback; because preload normally covers subdomains, one neglected hostname can break every host under the name. HSTS preload list submission has no fee, but the operational cost is ongoing certificate management and change control—assign an owner for the preload status and review it whenever a new subdomain is added.</p>
<div class="sg-faq" data-sg-faq><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">Is HSTS preload list submission free?</button></h3><div class="sg-faq__a"><p>Yes. hstspreload.org does not charge a submission fee, and there is no paid tier for HSTS preload list submission. Your costs are TLS certificates, which range from $0 with Let&#039;s Encrypt to commonly $10–$300/year for commercial DV/OV certificates, plus the engineering time to audit subdomains and maintain renewals.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">How long does HSTS preload list submission take?</button></h3><div class="sg-faq__a"><p>The hstspreload.org check is immediate, but the domain usually sits at `pending` until the next Chromium list update. Chrome milestones are commonly about 6 weeks apart, and Firefox, Safari, and Edge ingest lists on their own schedules, so plan for weeks. Removal is slower and often takes months.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">What is the difference between an HSTS header and HSTS preload list submission?</button></h3><div class="sg-faq__a"><p>An HSTS header protects a user only after the first successful HTTPS response, per RFC 6797. HSTS preload list submission hardcodes the domain in browser-shipped lists so HTTPS is forced before the first request, but it requires `max-age=31536000`, `includeSubDomains`, `preload`, and HTTPS on every subdomain.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">Why does hstspreload.org reject my max-age value?</button></h3><div class="sg-faq__a"><p>hstspreload.org requires `max-age` to be at least 31536000 seconds (1 year). A common failure is 15552000 (6 months) or 86400 (1 day), which is valid HSTS but below the preload minimum. Set `max-age=31536000`, purge CDN caches, and confirm every edge serves the updated header.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">Can I submit a domain if one subdomain only supports HTTP?</button></h3><div class="sg-faq__a"><p>No. HSTS preload list submission requires `includeSubDomains`, and hstspreload.org expects every subdomain to work over HTTPS. Audit wildcard DNS names, certificate transparency logs, and internal hostnames first; either fix the subdomain or do not submit the parent domain.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">How do I remove a domain from the HSTS preload list?</button></h3><div class="sg-faq__a"><p>Remove the `preload` token from the header, submit a removal request at hstspreload.org, and wait for browser list updates. Do not rely on `max-age=0` while the domain is still preloaded, because browsers that already shipped the static entry will continue to force HTTPS until they receive the updated list.</p>
</div></div><div class="sg-faq__item"><h3><button type="button" class="sg-faq__q" aria-expanded="false">Does HSTS preload replace a valid TLS certificate?</button></h3><div class="sg-faq__a"><p>No. HSTS preload list submission only forces browsers to use HTTPS; it does not validate identity or replace certificates. A preloaded domain with an expired or mismatched certificate produces a hard TLS error, so automate renewal with Certbot or your ACME client and monitor expiry.</p>
</div></div></div>
<hr>
<p><em>本文由 sslgood.com 安全团队基于生产环境实战经验撰写，关键结论均经过技术复核。</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
