Skip to content
// glossary

What is HSTS?

also: HTTP Strict Transport Security

// short answer

A security header that tells browsers to only ever use HTTPS for your site, so visitors cannot be quietly downgraded to an unencrypted connection.

In plain English

HSTS (HTTP Strict Transport Security) is a header your site sends over HTTPS. It tells the browser: "for the next so many seconds, only ever talk to this site over HTTPS, even if someone types or links to http://".

A typical HSTS header (one year)
Strict-Transport-Security: max-age=31536000; includeSubDomains

max-age is the number of seconds the browser remembers the rule. Six months (15552000) or more is a common recommendation, and a year is typical. includeSubDomains applies it to every subdomain, and preload asks to be added to the list built into browsers — only use those once every subdomain works over HTTPS.

Why it matters to a small business

Without HSTS, the first visit to your site can happen over plain HTTP before your redirect kicks in. On public Wi-Fi, that gap can be used to intercept or alter the page. HSTS closes it for returning visitors.

What to do

Make sure every page works over HTTPS and that http:// redirects to https://. Then add the header with a short max-age, confirm nothing breaks, and raise it to six months or a year. Our SSL certificate checker checks the redirect and the header together.

Does your site get HSTS right?

Find out in about 30 seconds with the free, passive check. Nothing is attacked and nothing is stored.

Talk to a human