For indie software publishers, ensuring secure connections is vital. This article clarifies what HSTS is and how its response header works. We will examine the specific parameters that define the policy's scope and duration, and discuss essential prerequisites such as valid SSL/TLS certificates before enabling the feature.
Understanding the Role of HSTS in Enforcing Secure Connections
As a hypothetical case, picture an independent publisher preparing a small documentation page that explains HSTS to customers while also serving as a configuration checklist. The author’s desk holds three draft headings, not final marketing copy: “What the Strict-Transport-Security Header Does,” “A Minimal HSTS Policy for a Download Page,” and “Common Header Mistakes Before Publishing.” These are the author’s own working labels, chosen to keep the page short and practical.
The author turns the second heading into a form-like configuration sheet with columns for field, intended value, and note. Two invented example rows show how the sheet is meant to work. One row uses the field name max-age with a value of 31536000 and the note “one-year duration in seconds; review before shortening.” Another row uses includeSubDomains with the value “enabled” and the note “check whether every subdomain serves HTTPS first.” A separate line for preload is left as “not requested in this example,” because the author wants readers to understand that preload is a distinct decision rather than an automatic part of the header.
For the first heading, the author writes a short explanation in plain language: the response header tells a browser to use HTTPS for later requests to the host for the stated period. The example then contrasts two choices without claiming any outcome. Choice A sends the header only on the main site; Choice B sends it on the main site and all subdomains. The author selects Choice A for the sample because a staging subdomain in the draft is described as still under review, making the narrower scope easier to reason about. This is a made-up editorial choice, not a report of a real deployment or a recommendation for every publisher.
The third heading becomes a compact pre-publish list: confirm the HTTPS certificate covers each named host, test the header on a staging response, and decide deliberately whether subdomains are included. The author also adds a note that header names and value formats should be checked against current browser documentation rather than copied from memory. These are illustrative materials created to explain the problem, not evidence of a real publisher’s operations, customer feedback, or completed testing.
Decoding the Structure of the Strict-Transport-Security Header
The Strict-Transport-Security response header has a documented structure: the header name followed by max-age, with includeSubDomains and preload as optional parameters. Per the source, max-age is the header's expiry time in seconds, and the client is forced to use HTTPS during that period. includeSubDomains, when present, means the domain and all its subdomains have HSTS enabled. preload is needed when applying to have the domain added to the browser's built-in list. The same source states that HSTS policies apply only to domain names, not IP addresses.1
Take one working heading and turn it into a short explanatory paragraph a reader can act on. For “What the Strict-Transport-Security Header Does,” you might draft: “This header asks a browser to keep using HTTPS for later requests to this host for the time you set. It is a response header, so it belongs with the server’s reply, not in the page body.” If that feels abstract, add one concrete sentence about what changes for the visitor: the browser stops offering a plain HTTP version for the stated period. Keep the paragraph to three or four sentences so the configuration sheet below it stays the focus.
For the other two headings, you can decide whether each stays a heading or becomes a labeled row in a small table. “A Minimal HSTS Policy for a Download Page” could become three rows — field, value to try, and a one-line note — with an invented example such as max-age set to a modest number and a note saying it can be raised later. “Common Header Mistakes Before Publishing” might work better as a short list of questions you ask yourself, each paired with the fix you would make. Choose the form that matches how you will actually use the page: a table if you will copy values, questions if you will review a server reply.
Configuring Max-Age and Subdomain Inclusion Parameters
The Strict-Transport-Security header structure includes a required max-age parameter, measured in seconds, which defines the duration during which clients must enforce HTTPS access. An optional includeSubDomains parameter extends this policy to all subdomains of the current domain. Another optional parameter, preload, is used when applying for inclusion in browser built-in lists. Before enabling HSTS, ensure SSL/TLS certificates are configured for the site. Note that HSTS policies apply only to domains, not IP addresses. If a client first accesses via HTTP before the policy syncs, the edge node redirects the request to HTTPS. Once configured, do not simultaneously set up forced HTTP redirection from HTTPS.1
If a draft already explains what the header does, the next useful move is to give the max-age value a visible place in your own notes. You can pick a short lifetime first, such as a few minutes for a staging host, and write that choice beside the sentence that mentions the header. A second line noting when you would raise it keeps the reasoning next to the wording instead of leaving it in your head.
For subdomain inclusion, consider treating the decision as a sentence you draft, not a setting you announce. You might write “This policy applies to this host only” for one version, then a parallel line that names the parent domain and says what would change if you extended coverage. Keeping both drafts lets you compare tone and completeness before choosing one for the page.
You can reuse the same three-column sheet for a live entry and an archived one. A current example row might read: field, “max-age”; intended value, “short at first”; note, “revisit after the staging check.” A past entry could use field, “max-age”; value, “the value once published”; note, “kept for reference.” The rows stay parallel while the wording shifts from intention to record.
Verifying SSL Certificate Status Before Activation
Before enabling HSTS, the source says to confirm that your site has successfully configured an SSL/TLS certificate and an edge certificate. The source treats this as a prerequisite check, not as something HSTS itself performs, so the certificate and edge certificate must already be in place.1
The source places that certificate configuration under the same edge certificate area used to turn on HSTS, so the check belongs in the same part of the console. It does not describe a separate verification method or test step here; it simply requires that SSL/TLS and edge certificates be configured successfully first.1
Before you move from certificate checking to header activation, consider giving the certificate verification its own dated entry in your working notes so the check has a visible outcome. A simple line a reader can keep for themselves might read: “host: downloads.example.test; certificate verified: yes; date checked: 12 March; note: covers the download host only.” This is an author example, not a record of a real check, and you can adapt the fields to whatever you actually need to confirm.
For the third working heading, “Common Header Mistakes Before Publishing,” you might draft one sentence per mistake rather than a list of commands. A before-and-after pair can make the point concrete without asserting what any browser will do: “Before: the response header was copied to the page body. After: it is described as a response header sent with the page.” Add a short reason you can defend from your own reading, such as keeping the explanation separate from the configuration note.
You can also choose where the verification note lives. It might sit under the minimal-policy heading as a labeled line, or become a short paragraph just before activation steps. Either way, keep the language tentative until you have confirmed the entry yourself, and leave the final wording as your own choice.
Managing Policy Updates and Client-Side Propagation
The source page states that because the HSTS policy takes effect on the client side, turning HSTS off does not take effect immediately; a refresh is needed so the policy is delivered to the client on its next HTTPS request. That statement is scoped to the described product, so treat it as a reason to plan policy changes rather than a rule for every tool.1
The page also notes that on a client's first visit over HTTP, the HSTS policy has not yet reached the client, and the service redirects that HTTP request to HTTPS to avoid the risk. This description applies only to the service the original page documents; no other service's behavior should be assumed from it.1
You can start with the live entry you already drafted and add a dated change note beside it, rather than rewriting the whole explanation. For example, if your working row reads field “max-age,” intended value “short at first, then longer,” note “revisit after client adoption,” a new note might say “draft reviewed; value kept; reason unchanged.” That keeps the policy sentence stable while showing readers when it last changed. You might apply the same pattern to an archived entry, writing “archived; superseded by the shorter value” instead of deleting the old row.
Because browsers learn HSTS only after receiving the header once, your page can help readers understand why a change may not appear everywhere at the same time. Consider adding a plain sentence such as “Existing visitors may continue using the previous policy until their browser refreshes it,” placed just after the change note. You can choose whether that sentence belongs under the live example or in a short paragraph before the archived one.
If your documentation includes a “Common Header Mistakes” section, one honest sentence about propagation is worth more than a long warning. You might draft: “A changed value does not reach every client immediately.” This is your own wording choice, not a guarantee about any particular browser.
Applying Global Settings Versus Rule-Based Conditions
The documented console treats HSTS as a site-wide function: a configuration added there “takes effect for all requests under the site.” For narrower control, the same source says a rule-based configuration can use rule conditions to identify specific parameters carried in a user request, so the rule applies only to the requests it matches. In that mapping, the site-wide HSTS configuration corresponds to the rule function named HSTS. The page gives the site-wide steps — choose site management, open the target site, go to SSL/TLS and then edge certificates, click configure in the HSTS area, turn on the status switch, and confirm — but does not spell out how to build the matching rule condition.1
You can take your three draft headings and decide which ones describe a single global setting and which describe a condition that should apply only to certain paths or hosts. For “A Minimal HSTS Policy for a Download Page,” you might draft a sentence like “This policy applies to the whole host, so every page beneath it inherits the setting,” then note whether that matches your intent. If you would rather limit scope, write a separate sentence naming the specific path and the condition under which it should receive the header.
You might also compare two candidate wordings side by side. One reads “Apply this globally to the host,” while another reads “Apply this only when the request matches the download path.” Record which one fits your material and why, in your own words, without presenting either as a tested result.
If you keep a small three-column sheet, you can add a row for scope with a filled example: field, “scope”; intended value, “host-wide”; note, “pages outside the download path inherit it too.” Treat that as a demonstration row you may revise, not a fixed requirement.
Before you settle the question, consider writing one dated line in your notes about which condition you chose and what you expect to check later. That keeps the global-versus-conditional decision visible when you return to the draft.
Frequently asked questions
How can I give the max-age value a visible place in my own notes if my draft already explains the header?
If a draft already explains what the header does, the next useful move is to give the max-age value a visible place in your own notes. You can pick a short lifetime first, such as a few minutes for a staging host, and write that choice beside the sentence that mentions the header.
How might I draft the subdomain inclusion decision as a sentence rather than a setting?
For subdomain inclusion, consider treating the decision as a sentence you draft, not a setting you announce. You might write “This policy applies to this host only” for one version, then a parallel line that names the parent domain and says what would change if you extended coverage.
How can I compare two candidate wordings for whether the policy applies globally or only to the download path?
You might also compare two candidate wordings side by side. One reads “Apply this globally to the host,” while another reads “Apply this only when the request matches the download path.”