webzod
account

Re-enable HSTS (max-age is zero) on Cloudflare

tls.hsts.disabled · effort: minutes

Why it matters

A max-age of zero tells browsers to forget HSTS, so the site is sending the header but gaining no protection from it. It is often left over from a rollback.

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. Open SSL/TLS then Edge Certificates then HSTS. If max-age is set to Disable, Cloudflare sends max-age=0. Choose a max-age and enable the setting.
  2. If you set the header with a Transform Rule or at your origin instead, change the value there.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.