Glossary

What is HSTS (HTTP Strict Transport Security)?

Also called: Strict-Transport-Security

HSTS stands for HTTP Strict Transport Security. Your site sends one header, Strict-Transport-Security, with a lifetime in seconds called max-age. During that time the browser goes straight to the secure page and never tries the plain http:// version.

Why it matters

It protects visitors from being pushed onto an insecure connection after their first visit. It mainly builds visitor trust and safety; we make no claim that search or AI systems prefer sites that use it.

How Onbiom checks it

Onbiom's rule: the homepage response must carry a Strict-Transport-Security header with max-age of at least 31536000 seconds, which is one year. A missing header or a shorter lifetime fails. Other settings in the header, such as includeSubDomains or preload, are not assessed.

If your homepage is not served over HTTPS the check does not apply. If a website builder such as Wix or Shopify controls this setting, the result says it is handled by your platform. This is a safety advisory about your visitors, reported apart from search visibility.

In your report this appears as: Browsers told to use a secure connection.

How to check it yourself

  1. Run the command below against your own address.
  2. Look for max-age=31536000 or a larger number.
curl -sI https://example.com | grep -i strict-transport-security

Not sure about your own site? Paste your address and see in a minute which of these checks your site passes. Free, no account needed.

Check your site

How to fix it

Any website
Switch on HTTPS-only (HSTS) for one year at your host or CDN. Make sure every page opens over https first, because browsers remember it.
Cloudflare
Open your domain, go to SSL/TLS, then Edge Certificates, and enable HTTP Strict Transport Security with a max-age of 12 months.
nginx
Add add_header Strict-Transport-Security "max-age=31536000" always; to your HTTPS server block and reload.
Apache
Add Header always set Strict-Transport-Security "max-age=31536000" to your HTTPS site configuration and reload.

Related terms

Sources and further reading

Last reviewed: