F4 · security-headers
Tell browsers to always use HTTPS
- What it means
- An HSTS header sends browsers straight to https://, even when a visitor types your address without it, so after the first visit, every return visit goes straight to an encrypted connection.
- Evidence
Strict-Transport-Security: (header absent)- Expected
Strict-Transport-Security: max-age=31536000- Fix
- Send Strict-Transport-Security in stages: max-age=300 first, then a week, then max-age=31536000 once every page works over HTTPS. Add includeSubDomains only when every subdomain works over HTTPS. Leave preload off unless you're sure: it is hard to undo.