HSTS Max-Age Calculator for Rollouts

July 17, 2026

HSTS Max-Age Calculator

Plan Strict-Transport-Security duration, preload readiness, includeSubDomains blast radius, staged rollout timing, rollback cache exposure, and HTTPS coverage before publishing the header.

🔒 HSTS Rollout Presets

⚙ Policy and Rollout Inputs

Mode changes the scoring weight and how aggressive the recommended header should be.
Leave blank to calculate from today and max-age.
Check the inputs. Max-age and rollout values cannot be negative, HTTPS readiness must be 0 to 100, and rollback mode should normally use max-age 0.
Max-age duration
30.0 days
1.0 months
Preload readiness
Watch
Missing 1 year max-age
Rollback window
30.0 days
Cache expiry estimate
Coverage score
82 / 100
Good staged policy

📊 HSTS Duration Reference

300 sSmoke test
Five minutes is easy to reverse during a first header check.
86400 sOne day
A common early canary value for low-risk production hosts.
2592000 sThirty days
Useful once cert renewal, redirects, and mixed content are stable.
31536000 sPreload floor
Browser preload submission expects at least one year.
DurationSecondsApprox monthsBest useRollback impact
5 minutes3000.0001Header syntax and redirect smoke testVery short cache exposure
1 hour36000.0014Small canary group or staging domainMost users recover the same day
1 day864000.03Initial production enforcementBad certs can hurt for a day
7 days6048000.23Early rollout with monitoringA week of cached enforcement
30 days25920001.0Stable site with known subdomainsRollback is slow for returning users
90 days77760003.0Mature HTTPS estateQuarter-long browser memory
180 days155520006.0Preload rehearsal or compliance targetLong-lived client enforcement
365 days3153600012.0Preload-ready production policyOne year rollback window
2 years6307200024.0Very mature high-assurance domainsHard to unwind after mistakes

🧭 Policy Comparison Grid

Policy modeExample headerOperational requirementPreload statusUse when
Observe onlyNo HSTS headerHTTPS audit, redirect check, mixed content cleanupNot eligibleYou are discovering hosts and dependencies.
Canarymax-age=300Monitor cert validity, redirects, and app loginsNot eligibleYou want fast rollback while testing real traffic.
Short enforcemax-age=86400Stable TLS on apex and primary hostnamesNot eligibleThe main site is ready but the fleet is not proven.
Subdomain enforcemax-age=2592000; includeSubDomainsEvery subdomain must serve valid HTTPS or be unusedNot enough durationYou have inventory and want broad browser enforcement.
Preload candidatemax-age=31536000; includeSubDomains; preloadOne year max-age, includeSubDomains, preload token, HTTPS everywhereEligible if auditedYou are ready for browser preload review.
Rollbackmax-age=0Header must reach users before cached entries expireRemove separatelyYou need to stop renewal of HSTS cache.

🗂 Rollout Planning Tables

Rollout stageSuggested max-ageGate to advanceMonitoring focusFallback
Syntax test300 to 3600 secondsHeader appears once, no duplicate conflictResponse headers and redirectsRemove header
Apex canary1 dayNo cert, login, or redirect failuresTLS expiry, 301 chain, auth cookiesmax-age=0
Core services7 to 30 daysRenewal automation passes twiceACME jobs, CDN config, uptime checksShorter max-age
Subdomain scope30 to 90 daysInventory shows HTTPS readiness near 100%Legacy hosts, wildcard DNS, forgotten CNAMEsDisable includeSubDomains
Preload rehearsal180 daysNo emergency exceptions after full cache cycleAll owned hostnames and third-party aliasesPause at current stage
Preload submit365 days or moreMeets preload requirements and owner approvalBrowser preload status and removal processRequest preload removal
Readiness itemPass signalRisk signalWhy it matters
Certificate automationRenewals tested before expiryManual cert rotationExpired certs become hard failures under HSTS.
HTTP redirectHTTP redirects directly to HTTPSLong chains or conditional redirectsBrowsers upgrade future visits and expect HTTPS.
Subdomain inventoryAll names known and classifiedWildcard DNS with unknown appsincludeSubDomains covers the full namespace.
Mixed contentNo active HTTP assetsOld scripts, iframes, or API endpointsHSTS can expose missed HTTP dependencies.
Third-party CNAMEsVendors serve valid HTTPSVendor owns TLS lifecycleYour policy can break delegated hostnames.
Rollback channelConfig can ship max-age=0 quicklyHeader managed by several teamsRollback does not clear existing browser cache instantly.

✅ Practical Tips

Start tiny, then hold. HSTS is sticky. A five-minute or one-hour max-age proves syntax without trapping returning users for weeks.
Do not preload surprises. Preload is a browser-vendor distribution path, so removal is slower than editing a server header.
Inventory before includeSubDomains. One forgotten camera panel, NAS alias, mail hostname, or vendor CNAME can make the whole domain feel broken.
Track the expiry date. Rollback means sending max-age=0, then waiting for clients that already cached the old value.
This calculator is a planning aid. Confirm current browser preload requirements and your application behavior before submitting a production domain for preload.

Sysadmins wonder what HSTS is. It’s just a configuration flag for enabling HTTPS. It is no big deal until you actualy set it and run into trouble.

Everything works as expected: Your primary website loads over HTTPS, great! Everyone are happy for a while. A week later, however, a user tries to visit your stats dashboard (on `stats.example.com`) using the wrong protocol: HTTP. And your browser say nope. Your users can’t reach a vital system because that one subdomain happens to still contain some legacy code which doesn’t speak TLS.

Why You Need to Plan Before Using HSTS

Browsers aggressively cache the HSTS header, they remember their decision for the duration specified in your max-age header. This is great for security, it’s why we like HSTS, but it also locks you into a corner if your infrastructure isn’t prepared. How long does the lock last? Can all of your system handle the enforcement? Work out those numbers.

That’s where the calculator comes in: it models out this risk prior to deployment. It doesn’t just do the math between days and seconds for your server config; it also makes you think about the consequences of your actions. How long is that max-age going to be? What happens when that period elapses? Thirty days without a fallback…what if something goes wrong with your cert renewals on day twenty nine? Users gets hard errors until either they refresh their cache or someone else (you) steps in manually to help. The tool takes all of this into account and gives an estimate of how long it would of take to roll back.

Disabling HSTS in production won’t remove previously cached copies from browsers, they’ll need to forget. When used incorrectly, the includeSubDomains directive can get you into trouble. This directive applies your policy to all hostname within your domain, even those you may have forgotten about. Shadow IT is rife with old staging environments, vendor portals, IoT dashboards, etc. If one of these do not serve valid HTTPS, then your entire domain falls victim to this.

Based off how many subdomains you report and what percentage is covered by HTTPS, our calculator will rate your readiness. Anything below a score of ninety indicates that you’ve got some inventory holes. Don’t let that number slip by. That’s telling you to leave your initial max-age low as you track down those rogue hosts.

But there’s one more level of finality: preloading. Submitting your domain to the browser preload list bakes your HSTS policy into the browser binary itself. No HTTP request ever gets made by users; they just know they need HTTPS. It is great for security but more horrible than flexibility. Once you’re on a preload list, removing yourself is a slow, manual process. Only do this once you’ve run a staged rollout with a long max-age (e.g., one year) and confirmed no failures. The calculator checks if you has enough time and the necessary includeSubDomains flag to qualify for preload submission. These are the technical requirements for being listed.

Begin with baby steps. Use the max-age as your safety net when starting out, setting it to five minutes or maybe just one day. This proves that your redirects work and that certificates is valid without trapping users for weeks. Once you’re confident, gradually increase the period of time. A month is an industry-standard sweet spot for sites nearing stability. For more mature estates preloaded for the long haul, a six-month-to-one-year window are the norm. The tool includes a table of reference periods so you can check how yours measures up against industry standards.

In the end, it boils down to planning for uncertainty (and time). For how long do you think you’ll have control over your infrastructure? How long does your infrastucture need to stay secure? That’s a judgement call, but the math is provided by the calculator. Check your certificate rotation jobs. Audit your subdomains. Make sure all your API endpoint speak TLS. Do that work first. Then set the header. Don’t leave it until after someone complains that they couldn’t log into their account for a month because of an expired cert on a forgotten test server. Better to err on the side of caution now.

HSTS Max-Age Calculator for Rollouts

Related posts

Leave a Comment