HTTPS, HSTS, and TLS

Missing HSTS header? How to check, fix and retest

If the HTTPS response is missing Strict-Transport-Security, add the header where visitors connect over HTTPS. That may be your CDN, load balancer or web server. Then check the same public hostname again and record the policy you observe.

Check the public HTTPS response

Inspect the headers using the same HTTP method as the checker

curl -sS -D - -o /dev/null https://example.com/

Replace example.com with a hostname you manage. On a successful HTTPS response, look for Strict-Transport-Security. If it is present, check max-age. A value of zero removes the policy for that host. An invalid or short max-age can still fail the check even when the header is present.

Fix the header where HTTPS is served

  • Confirm HTTPS and the certificate work on the public hostname. Set the header in one place at the serving edge so the final response carries a single policy.
  • If you use proxied Cloudflare DNS, review HTTP Strict Transport Security under SSL/TLS → Edge Certificates. With another CDN or a managed host, ask who controls the HTTPS response headers.
  • For a rollout, start with a short max-age and increase it after you confirm HTTPS works. Enable includeSubDomains or preload only after reviewing every covered host and the rollback implications.

Retest the same hostname

Run the HTTPS check again after the configuration takes effect. RemedyProof’s HSTS rule requires max-age of at least 15,552,000 seconds (180 days) to pass. That is the checker’s reporting baseline. An eligible free HSTS retest that passes gives you a dated before-and-after report for the same hostname.

Check redirects and TLS separately

Inspect the HTTP redirect

curl -sSI http://example.com

Look for a 301, 302, 307, or 308 response with a Location value using https:// and the expected hostname.

Test obsolete TLS versions

openssl s_client -connect example.com:443 -tls1 -servername example.com < /dev/null
openssl s_client -connect example.com:443 -tls1_1 -servername example.com < /dev/null

A successful TLS 1.0 or 1.1 handshake shows that the public endpoint still accepts that protocol. An OpenSSL error can also come from your local client disabling the protocol or its ciphers. Confirm that the client sent a handshake and that the server rejected it before recording a pass.

Common misleading outcomes

  • A redirect works for the apex but not for a www or application subdomain.
  • HSTS appears in a cached response, but not at the public edge or on every covered hostname.
  • Cloudflare’s dashboard setting is correct while DNS is not authoritative for the hostname being tested.
  • A reverse proxy terminates TLS before the origin, so an origin-only test does not describe visitor behavior.
  • A scanner follows redirects and reports only the final HTTPS response, hiding that the HTTP upgrade was absent.

Keep the conclusion bounded

Record the hostname, timestamp, response values, and tested edge. These checks describe a point-in-time observation; they do not certify compliance, prove a website is secure, or replace a penetration test. The free Public Snapshot is read-only, one-time, retained for seven days, and does not enable recurring monitoring.