HSTS Header Builder
Assembles a Strict-Transport-Security header line from a max-age in seconds plus optional includeSubDomains and preload directives, ready to paste into a config.
Header
—
Building the HSTS header without locking yourself out
HSTS instructs the browser to reach that domain over HTTPS only, for as long as the header declares. The gain is closing the first-visit window: without it, someone typing the address without a scheme makes one cleartext request before the redirect, and that request is where a network attack fits.
Choose the duration and the two options and the page assembles the header. The common value is one year, and the reason it runs so long is that the effect only exists for people who already visited — a short window means the browser forgets and the gap reopens. The subdomains option extends the rule to everything beneath the domain, and the preload flag signals intent to join the list built into browsers.
The care required scales with the duration: the header cannot be undone remotely. Shipping it with subdomains included takes down any subdomain still serving plain HTTP — an internal system, an old environment, a forgotten panel — and the browser of anyone who already visited will refuse for a year. The safe practice is shipping with a short duration, confirming everything answers over HTTPS, and only then raising it.
Frequently asked questions
What does the preload flag actually do?
Can I get off the preload list?
Does the header work over HTTP?
Related Tools
HSTS Header Builder
Builds the Strict-Transport-Security header with max-age, includeSubDomains and preload as selected.
Referrer-Policy Builder
Builds the Referrer-Policy header from a standard value (strict-origin, no-referrer, etc.).
Permissions-Policy Builder
Builds the Permissions-Policy header from a list of feature=allowlist entries (e.g. geolocation=()).
Public-Key-Pins (HPKP) Header Reader
Parses a Public-Key-Pins header: lists the pins, checks the base64 SHA-256 format, reads max-age and explains why HPKP was dropped and what replaced it.
X-Content-Type-Options Header Check
Confirm X-Content-Type-Options is set to nosniff and explain MIME-sniffing risks when the header is missing.
Email Header Analyzer
Analyzes a raw email header: Received server chain, per-hop delays, SPF, DKIM, DMARC results and spoofing warning signs.