Fix · Apache
Fix “HTTP Strict Transport Security (HSTS)” on Apache
Add: Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
Verify the fix
Re-run the HTTP Strict Transport Security (HSTS) check after deploying. Test config changes in staging first and keep a rollback: a wrong header can break a site faster than a missing one.
Other stacks: nginx · Caddy · Express / Node · Cloudflare