webzod
account

Fix the malformed Strict-Transport-Security header on Cloudflare

tls.hsts.invalid · effort: minutes

Why it matters

The header is present but does not follow the required syntax, so browsers ignore it and your site gets no HSTS protection. A small typo such as a missing max-age is enough.

Staged change. Do this in stages and check each one before the next, so a mistake does not break your site or your mail.

The fix

  1. If you use the built-in HSTS setting under SSL/TLS then Edge Certificates, set it again there and do not also set the header with a Transform Rule or at your origin. Duplicated values are a frequent cause of this finding.
  2. Otherwise correct the value at the origin or in your Transform Rule.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.