Syntax and directives
- max-age — the time in seconds the rule stays in force (recommended at least a year: 31536000).
- includeSubDomains — extends protection to all subdomains.
- preload — consent to add the domain to the browsers' built-in list (hstspreload.org), eliminating even the first HTTP request.
Deployment notes
The header only takes effect when sent over HTTPS. Roll out gradually: a short max-age first, then longer values and includeSubDomains, and preload only after ensuring all subdomains (including technical ones) support HTTPS — removal from the preload list takes months.
Example
A one-year policy with subdomain protection — a typical step before considering preload list submission.
Strict-Transport-Security: max-age=31536000; includeSubDomains