Skip to main content
KalkuNet

HSTS Header Generator — Strict-Transport-Security Ready for Preload

Build RFC 6797 HSTS headers ready for hstspreload.org submission.

Runs in your browserWeb · Security & Privacy
Output format:

This header meets the hstspreload.org header requirements.

  • ✓ max-age of at least 31536000 (1 year)
  • ✓ includeSubDomains present
  • ✓ preload token present
  • ○ Check by hand: a valid HTTPS certificate on the main domain
  • ○ Check by hand: HTTP redirects to HTTPS on the same host
  • ○ Check by hand: every subdomain serves HTTPS

When to use the Strict-Transport-Security (HSTS Preload) Generator

  • Force HTTPS in the browser

    Once a browser receives this header it always opens the site over HTTPS for the max-age period, which makes downgrade attacks and cookie theft on public networks much harder.

  • Preload requirements checked

    A max-age of at least one year, includeSubDomains and the preload token are checked against the hstspreload.org rules, plus a list of things to check on your server by hand.

  • Roll out step by step

    Start at 300 seconds, move to one day, then to one year. Durations are shown in plain words so a missing zero does not slip through.

  • Formats for your server

    A raw header, Nginx with always so it is also sent on error responses, Apache, Caddy or a _headers file, ready to copy or download.

Frequently asked questions

Which max-age should I use?

For production, at least 31536000 seconds (1 year); many sites use 63072000 (2 years). Start with a small value while testing.

Is HSTS sent over plain HTTP?

It would be useless: browsers ignore an HSTS header received over HTTP. Send it only on HTTPS responses and redirect all HTTP to HTTPS.

How do I withdraw HSTS?

Send max-age=0 over HTTPS. For a domain already on the preload list, also request removal at hstspreload.org.

Do I need includeSubDomains?

It is required for preload and advisable once every subdomain is on HTTPS. If an old subdomain still lacks HTTPS, fix it before turning this on.

Learn more