Remote product teams often need to secure web applications against protocol downgrade attacks. This guide outlines the practical steps for implementing HTTP Strict Transport Security (HSTS) headers, ensuring that browsers only connect via HTTPS. We will examine header directives, subdomain inclusion strategies, and the process for submitting domains to preload lists.
Understanding the Role of HSTS in Secure Web Architecture
Imagine a small remote product team drafting its first HSTS rollout note. The author keeps a one-page “security headers worksheet” beside a staging deployment, rather than treating the header as a checkbox. The worksheet has three columns: setting, intended value, and where it applies. A first row reads “Strict-Transport-Security,” “max-age=300,” and “staging host, all paths”; a second row reads “Strict-Transport-Security,” “max-age=31536000; includeSubDomains,” and “production host, after redirect checks.” These are invented examples for explaining the decision, not records of a completed trial.
The team’s immediate choice is the first max-age. A five-minute value gives a short window during which browsers remember to use HTTPS, which suits a staging rollout where a misconfigured redirect could otherwise strand testers. A one-year value suits the production host once the team has checked that every path, including the API subdomain, answers over HTTPS. The shorter value is not a weaker header so much as a shorter commitment; the longer value raises the cost of any later mistake.
A second choice is whether to add includeSubDomains. The author lists the hostnames under the team’s control, such as app, api, and docs, then notes that a forgotten subdomain serving plain HTTP would become unreachable under that directive. For this hypothetical rollout, the team leaves includeSubDomains off on the staging row and adds it to the production row only after the subdomain inventory is complete.
A third choice is preload. The author writes “preload” as a candidate value for a later phase, with a note that removal is slow and depends on browser programs outside the team’s control. The worksheet’s status column therefore reads “deferred” next to preload, and the note explains that the header itself still enforces HTTPS without it.
Finally, the author drafts two working titles for the internal note: “HSTS Worksheet: Staging First, Production Second” and “Header Settings We Can Explain.” The first title wins because it names the order of rollout and makes clear that the values differ by environment.
Configuring the Strict-Transport-Security Header Syntax
The MDN reference presents three syntax forms for the response header: a bare max-age directive, max-age followed by includeSubDomains, and max-age with both includeSubDomains and preload. It describes max-age as the time in seconds the browser should remember that a host is only accessed over HTTPS, and notes that an HSTS host is identified by domain name only, so an IP address cannot be one.1
The syntax carries conditions. MDN states that when preload is used, max-age must be at least 31536000 (one year) and includeSubDomains must be present. It also notes the header must be sent over HTTPS only; browsers ignore it if sent over insecure HTTP. To disable HSTS, the source says to set max-age=0, and that this takes effect only once the browser makes a secure request and receives the response header.1
Consider keeping a two-line draft of the header itself beside your worksheet, one line with only max-age and one line with max-age plus includeSubDomains, so the syntax is visible before any note about rollout order. You might write the first as max-age=300 for a staging host and the second as max-age=300; includeSubDomains for a later candidate, then mark which hosts each line would reach.
When the same header appears in a historical or archived announcement, you can reuse the worksheet fields without merging the two records. A current entry might read “setting: max-age=300,” “scope: app host only,” and “status: proposed for staging.” An archived entry might use the same three fields with “setting: unstated,” “scope: unknown,” and “status: reference only,” while a short note records that the archived page does not name a value. This keeps a missing value from looking like a deliberate choice.
You can also compare two candidate phrasings as an author exercise: “The header tells browsers to use HTTPS for five minutes” versus “The header asks browsers to remember HTTPS for five minutes.” The second wording names the remembered duration more plainly; either is a draft, and you can choose whichever matches the rest of your own note.
Implementing includeSubDomains for Comprehensive Coverage
OWASP's HSTS cheat sheet specifies that without includeSubDomains, the policy does not extend to the issuing host's subdomains. It sets includeSubDomains in example headers paired with max-age, including a useful option when all present and future subdomains will be HTTPS, which is described as more secure but blocking access to certain pages that can only be served over HTTP.2
The same source notes that omitting includeSubDomains permits a broad range of cookie-related attacks, since cookies can be manipulated from subdomains, and that HSTS would otherwise prevent this by requiring a valid certificate for a subdomain. The preload example also carries includeSubDomains, with a warning of permanent consequences.2
Before you widen an HSTS draft to cover subdomains, pick one concrete asset: an inventory of the hostnames your team actually controls, such as app, api, docs, and staging. List each one you intend the includeSubDomains value to reach, then mark which already redirect to HTTPS and which still serve plain HTTP. That list, not the header text, drives whether the wider value is safe to adopt now or later.
You might keep the inventory as a simple table with three columns: hostname, current scheme behavior you have observed, and whether it is in scope. Fill in a few rows as a worked example, such as app with a completed migration, api still pending, and docs out of scope for the first phase. Leaving the scheme column honest helps you see where the broader value would create a lockout risk.
If your list shows every in-scope host answering over HTTPS, you can consider drafting the broader header alongside your current one and noting which phase each belongs to. If some hosts are not ready, you can keep them out of scope and say so in the note. The choice stays yours; the inventory just makes the scope visible before the header commits to it.
Ramping Up max-age Values During Initial Deployment
The deployment guidance attributes a staged ramp-up to HTTP Strict Transport Security headers: add the Strict-Transport-Security header to all HTTPS responses and increase max-age in stages, first five minutes (max-age=300 with includeSubDomains), then one week (max-age=604800 with includeSubDomains), then one month (max-age=2592000 with includeSubDomains).3
During each stage, check for broken pages and monitor site metrics such as traffic and revenue. Fix any problems that arise, then wait the full max-age of that stage before moving to the next; the guidance gives waiting a month in the last stage as its example.3
Once your worksheet shows a short max-age working at staging, you can draft the next value as a separate candidate line rather than editing the staged one in place. For example, keep “max-age=300” as the approved staging entry and add “max-age=86400” below it with a note that it is a candidate for the next phase. You might record the reason beside each line, such as “covers one full day of testing” or “lets us revert quickly if a host misbehaves,” so the choice stays explainable later.
A second useful step is to decide how you will know the larger value is ready. You can write a short readiness question for the team to answer in its own words, for instance “Did every in-scope host serve HTTPS throughout the trial period?” and “Did anyone need to bypass the header?” Leave the answers blank until the team fills them in; the blank lines are a prompt for judgment, not a completed check.
You might also draft two phrasings of the same increase and pick one for the note: “We plan to raise max-age from five minutes to one day” versus “The next phase covers a full day of traffic.” The first names the change plainly; the second describes the intent. Either works as an author choice, provided the header line itself and the phase note stay separate, so a reader can tell what is planned from what is currently configured.
Submitting Domains to the HSTS Preload List
A site that sends the preload directive in its HSTS header is requesting inclusion in the preload list and may be submitted through the form on this site. Acceptance requires a valid certificate, an HTTP-to-HTTPS redirect on the same host when listening on port 80, HTTPS on all subdomains (including a www record if one exists), and an HSTS header on the base domain with max-age of at least 31536000 seconds, includeSubDomains, and preload. Any additional HTTPS redirect must still carry the header.3
The site notes that preloading is not recommended and that inclusion cannot easily be undone; removal takes months to reach users through a Chrome update, and other browsers offer no guarantees.3
You can prepare a submission note for the preload phase before any external step, keeping it clearly marked as a future action rather than a completed one. Draft it beside your existing worksheet and carry forward the same fields you used for the staged header, adding one line that records the intended max-age, whether subdomains are in scope, and the date you would revisit the decision. Leave the submission itself out of the record for now; the note documents your preparation, not an application you have sent.
You might also write a short reasoning paragraph for your own files explaining why preload stays in a later phase. A useful exercise is to compare two candidate sentences: “We will add preload once the staging header has held for a month” versus “Preload is the last value we add because undoing it is slow.” Either sentence can sit in the draft; the choice is yours, and the second one records a caution rather than a timeline. Keeping both versions side by side lets a teammate see the tradeoff without treating either sentence as a commitment.
If your team later revises the plan, you can keep the original note and add a dated line above it rather than rewriting the earlier text. That way the draft shows how the preload decision moved from a candidate to a scheduled step, and anyone reading it can tell which lines describe intent and which describe something already done.
Verifying HSTS Policies with Browser Developer Tools
You can take the header draft you already wrote beside your worksheet and give it a new job: a reading exercise with browser developer tools, done as preparation rather than as proof that anything is live. Open the Network panel on a staging page you control, select the document request, and read the response headers area as text you can compare against your own draft. Write down the header name and its value exactly as they appear, then place that line next to your worksheet line; any difference between them is a writing problem before it is a technical one.
A second exercise is to draft the sentence you would say to a teammate about what the panel shows. Consider two candidates: “The response carries the header with a five-minute max-age” and “The browser is being asked to remember HTTPS for five minutes.” The first describes what you read; the second interprets it. For an internal note you might prefer the first, because it keeps observation separate from explanation, and you can revise the second into a follow-up line about intent.
You can also prepare a small comparison sheet for the moment a change is proposed. Three columns work: what the response header currently shows, what your draft asks for, and what question still needs an answer. Fill in one row from your staging check, leaving the third column as an open question written in your own words, such as whether a short value is long enough for the team to notice a broken redirect.
If you keep an archived announcement alongside current notes, use the same three columns for it and mark the row as historical in the first column. That lets you read both records side by side without merging them, and you can decide later which one the team should cite. Treat all of this as material you are preparing, not as a verified result; the panel reading and the rows are yours to keep, adjust, or discard.
Frequently asked questions
How can I keep a two-line draft of the header beside my worksheet?
Consider keeping a two-line draft of the header itself beside your worksheet, one line with only max-age and one line with max-age plus includeSubDomains, so the syntax is visible before any note about rollout order.
What simple table can I keep to inventory the hostnames my team controls?
You might keep the inventory as a simple table with three columns: hostname, current scheme behavior you have observed, and whether it is in scope. Fill in a few rows as a worked example, such as app with a completed migration, api still pending, and docs out of scope for the first phase.
What three-column comparison sheet can I prepare for when a change is proposed?
You can also prepare a small comparison sheet for the moment a change is proposed. Three columns work: what the response header currently shows, what your draft asks for, and what question still needs an answer.
Strict-Transport-Security header - HTTP | MDN . Retrieved 2026-11-21. ↩︎ ↩︎
HTTP Strict Transport Security - OWASP Cheat Sheet Series . Retrieved 2026-11-21. ↩︎ ↩︎
HSTS Preload List Submission . Retrieved 2026-11-21. ↩︎ ↩︎ ↩︎ ↩︎