Foxcolab

Glossary

HSTS (HTTP Strict Transport Security)

Definition

HSTS: HTTP Strict Transport Security (RFC 6797): a policy a website declares in the Strict-Transport-Security response header so browsers reach it only over HTTPS for a set period and treat certificate errors as fatal.

Also known asHTTP Strict Transport SecurityStrict-Transport-SecurityHSTS header

In short

HSTS (HTTP Strict Transport Security, RFC 6797) is a policy a website sends in the Strict-Transport-Security header. After seeing it, a browser turns every http:// request for that site into https:// for max-age seconds, and won't let you click through certificate errors. The very first visit is still exposed, which the browser preload list fixes.

Key takeaways

  • HSTS makes the browser use HTTPS for a site, even when someone types or links http://.
  • Certificate errors on an HSTS site become hard failures with no "proceed anyway".
  • The header is ignored over plain HTTP, so it only takes effect after one secure visit.
  • includeSubDomains extends the rule to every subdomain, so test them all first.
  • Preloading builds the rule into browsers, but removal takes months.

Last reviewed 3 December 2026 by Foxcolab Team

HSTS, short for HTTP Strict Transport Security, is a policy a website sends to tell browsers to reach it only over HTTPS. RFC 6797 describes it as a way for sites to "declare themselves accessible only via secure connections." The site declares it in one response header:

Http
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

What the browser does#

Once a browser has seen the header over HTTPS, for the next max-age seconds (31536000 is one year) it:

  1. Rewrites http to https before sending anything, whether you typed http://example.com or followed an old link.
  2. Refuses to continue past certificate errors. RFC 6797 calls this "no user recourse": no "proceed anyway" button.
DirectiveMeaning
max-ageHow long, in seconds, the browser remembers the rule. 0 removes it
includeSubDomainsApplies the rule to every subdomain
preloadAsks to be built into browsers (see below)

A worked example#

You join a café's Wi-Fi and type example-bank.com. Without HSTS, the browser's first request goes out over plain HTTP, and a man in the middle on that network can answer it with a fake page that never switches to HTTPS. With HSTS cached from an earlier visit, the browser never sends that plain request, and a forged certificate gets a hard error instead of a warning you can click through.

The first-visit gap and preloading#

Browsers ignore the header when it arrives over plain HTTP, so a browser that has never visited the site is unprotected on that first request. Browser preload lists close the gap. Per hstspreload.org, a domain qualifies when it redirects HTTP to HTTPS and sends a max-age of at least one year with both includeSubDomains and preload. Removal "takes months" to reach users, so make sure every subdomain, including internal tools, works over HTTPS before you submit.

In Foxcolab#

foxcolab.com sends HSTS on every page with a two-year max-age, includeSubDomains and preload, and the Foxcolab Drive, Docs, Sheets, Notes and Whiteboard web apps send their own two-year policy. HSTS protects the connection. What travels inside it is protected separately: those apps encrypt your content on your device before upload, so Foxcolab can't read it. See TLS and encryption in transit for how the two layers fit together.

Keep exploring

All terms

Foxcolab

Private work tools, without the ads.

Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.

Jump to