Updated

Technology · Code & frameworks

HSTS

rfc-editor.org

What is HSTS?

HSTS is an HTTP response header that tells browsers to use only HTTPS when they connect to a website. It is an Internet standard, and a site turns it on by sending the header from its server.[1][2]

HTTP Strict Transport Security (HSTS) informs browsers that the site should only be accessed using HTTPS.

HSTS belongs toSecuritycategory.

Type

An HTTP response header[1]

Directives

max-age, includeSubDomains and preload[1]

Scope in time

Shapes future requests, not the current response[1]

Standard

Defined by the IETF[2]

1,632websites

use it — 64.3% of the 2,539 websites we scanned in the last 12 months

#1of 29

tools in its category seen in our scans (we recognize 117)

672public pages

on UptimeCard — open any of them to see how that site is doing

In short: a one-line header that makes browsers stop using plain HTTP for your domain. Turn it on only after HTTPS works on every page and subdomain you cover.[1]

79.5% of all websites we track run HSTS

What is HSTS used for?

In short, from the websites we scan

Upgrading http links to https
Browsers rewrite later http requests for the site to https before sending them.[1]
Refusing certificate bypass
Visitors cannot click through an invalid certificate warning on a site that sends the header.[1]
Covering subdomains
The includeSubDomains directive extends the rule to every subdomain of the host.[1]
Closing the protocol downgrade gap
With HSTS enforced, a browser upgrades http links itself, so an on-path attacker cannot rewrite the redirect to keep plain HTTP.[3]
Protecting cookies
Upgrading requests to HTTPS stops an on-path attacker from reading or injecting cookies on plain HTTP requests.[3]
What it does
HSTS is one of the security tools websites use. In our scans it is #1 of the 29 we see.
On real websites
Among 60 public websites we scan that use it: enforcing HTTPS connections (59 sites), blocking downgrade attacks (4 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate.

Should you use HSTS?

The 10-second version, from the vendor’s own pages and what we see in our scans

HSTS fits if…

  • You serve the whole site over HTTPS and want browsers to remember it[1]

Look elsewhere if…

  • Some subdomains cannot yet be served over HTTPS: fix them first, because the policy can cover every subdomain[3]
Browsers remember the rule for the time you set, so a mistake can lock visitors out until it expires[1]
Preloading has stricter requirements than the plain header[1]

Support and help for HSTS

How the vendor says you can reach it, and the public help community

Stack Overflow

335 questions[4][5]

60% have an upvoted answer. [hsts] questions

How HSTS sites protect themselves

Share of the 1,632 sites we scanned that run each protection

reCAPTCHA23% · 369 sites

reCAPTCHA is a free service from Google that helps protect websites from spam and abuse

Cloudflare Bot Management14% · 226 sites

Cloudflare bot management solution identifies and mitigates automated traffic to protect websites from bad bots

Protections add up, they do not replace each other: a site can run all of them.

What sites use HSTS for

An estimate from UptimeCard's technology map of 581 public sites

Runs the whole site562 sites

23m.com · 2600hz.com · 365retailmarkets.com

Hosts help, docs or support content10 sites

buildkitestatus.com · dash0status.com · discordstatus.com

Runs the marketing site6 sites

autotrader.nl · broadvoice.com · contentsquare.com

Runs a shop or catalog3 sites

allopneus.com · solidgate.com · uniflowonline.com

Rough guide, not a measurement: each description is written automatically from the site’s technology stack and the site has not confirmed it. A site is counted once, in the first group its description fits (shop, help and docs, blog, marketing site; otherwise the whole site). Descriptions that only guess (“likely”, “may”) are left out.

At a glance

UptimeCard's own scans and tests of 2,539 websites · refreshed weekly

How HSTS sites scoreout of 100 · hover or tap a score for details

51PerformanceLowaverage site: 5191AccessibilityGoodaverage site: 9196Best practicesGoodaverage site: 9692SEOGoodaverage site: 92

Page load time

Loads about as fast as the average site

HSTS sites
3.5 s
All sites
3.5 s

Most HSTS sites load in 2.5–5.2 s. Home page weight: 3.3 MB vs 3.4 MB for all sites. 641 public sites measured.

Where are they hosted?

Mostly Amazon Web Services and Cloudflare

  • Amazon Web Services32%
  • Cloudflare28%
  • Fastly6%
  • Google Cloud4%
  • Other29%
United States 58%Canada 22%Germany 3%

Who uses it?

Technology and Software is the biggest group

Technology and Software60%
Business Services12%
Software as a Service (SaaS)6%
Educational Resources4%

Share of 670 classified public sites. “× average” compares with all 961 public sites.

Browser-security check

36% of graded sites pass

63of 176 score B or better

Rates each site’s own security settings, not HSTS. 176 public sites graded so far.

How HSTS sites are built

Stacks we see most. Tools that tend to run together with HSTS on the same websites. The percentage is the share of all 1,632 HSTS sites that run the whole stack.

3 stacks · swipe, drag or use the arrows
#1

HSTS + Akamai + Boomerang

4.8%79 of 1,632 sites
#2

HSTS + Akamai + Adobe Experience Manager

2.3%38 of 1,632 sites
#3

HSTS + Adobe Experience Manager + Adobe Client Data Layer

2.1%34 of 1,632 sites

Usually installed alongside

The bigger the bubble, the more of the 1,632 HSTS sites also run the tool. Colour shows what the tool does. Hover or tap a bubble for details.

Google Tag Manager58%Google Analytics52%Linkedin Insight Tag22%Facebook Pixel19%OneTrust20%Microsoft Advertising15%DoubleClick Floodlight12%HubSpot12%
Tag managerAnalyticsCookie consentAdvertisingMarketing

Similar tools in its category

Security: 117 tools known, 29 seen in our scans

How websites combine HSTS with other tools

Relationships found on the websites that use it, from the same map status pages show.

Complements another tool 168Integrates with another 81Needs another tool 53Built on a platform 37

Websites using HSTS

1,632 websites use HSTS: 64.3% of the 2,539 websites we scanned in the last 12 months. A selection is shown below.

Scores are out of 100: P Performance · A Accessibility · B Best practices · S SEO. Green 80+, yellow 65–79, orange 50–64, red below 50. The dot shows whether our last scan found the site failing (red) or not (green); Red, amber or blue: an active incident on the site's status page (outage, degraded, maintenance) or a failing scan; amber also means a certificate ending within 30 days. Hover the dot for details.

Who is behind HSTS

From its own pages and public records, with sources

Developed by

Internet Engineering Task Force[2]

Its story

  1. 2012

    RFC 6797 defined HSTS as an Internet Standards Track mechanism for sites to declare themselves accessible only over secure connections.[2]

  2. 2015

    The Strict-Transport-Security header became available across browsers, which made it usable on the open web.[1]

  3. 2017

    The preload list tightened its rules: domains submitted from October 2017 must meet the full requirements, while earlier ones from 2016 had a shorter required max-age.[3]

Questions about HSTS

What is HSTS?
HSTS is an HTTP response header that tells browsers to use only HTTPS when they connect to a website. It is an Internet standard, and a site turns it on by sending the header from its server.
What is HSTS used for?
Browsers rewrite later http requests for the site to https before sending them. Visitors cannot click through an invalid certificate warning on a site that sends the header. The includeSubDomains directive extends the rule to every subdomain of the host. With HSTS enforced, a browser upgrades http links itself, so an on-path attacker cannot rewrite the redirect to keep plain HTTP. Upgrading requests to HTTPS stops an on-path attacker from reading or injecting cookies on plain HTTP requests. HSTS is one of the security tools websites use. In our scans it is #1 of the 29 we see. Among 60 public websites we scan that use it: enforcing HTTPS connections (59 sites), blocking downgrade attacks (4 sites). Counted automatically from a short description of each site (one site can do several jobs), so read it as an estimate.
Does HSTS work for an IP address?
No. A host is identified by its domain name, and an IP address cannot be an HSTS host.[1]
Does HSTS apply to every port?
Yes. It applies to all ports of the host, whatever port was used for the request.[1]
How should I roll HSTS out?
Raise max-age in stages, check for broken pages at each step, and wait the full period before the next stage.[3]
How do I turn HSTS off?
Send the header with max-age set to zero.[1]
What about a visitor's very first request?
The browser cannot know a site's policy before the first visit, which is why Chrome ships a preload list of HTTPS-only domains.[3]
Which attacks does it address?
Protocol downgrades, cookie hijacking and browsing history leaks on plain HTTP links.[3]
How many websites use HSTS?
We found HSTS on 1,632 of the 2,539 websites we scanned in the last 12 months (64.3%). 672 of them have a public status page.
What are the alternatives to HSTS?
Other security tools we recognize include reCAPTCHA, Cloudflare Bot Management, Akamai Bot Manager, Cloudflare Turnstile.

Is your website built with HSTS?

Create a free status page that shows your visitors your site is up. It also gives your site its own public page where new people can discover it.

Example status page card