DELAPARRA
Index
Color
NL
Category: HTTP headers

Strict-Transport-Security

Explained by Updated

What is Strict-Transport-Security?

Strict-Transport-Security: HSTS — tells the browser to use HTTPS for this domain for the given number of seconds, even if the user typed http://. Strict-Transport-Security, or HSTS, tells browsers to use HTTPS for your domain for a set period, even if someone types http:// or follows an old link. max-age=63072000; includeSubDomains means two years, for all subdomains.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Strict-Transport-Security

How is Strict-Transport-Security used in practice?

This closes a gap. Without it, the first request to http:// can be intercepted on a hostile network before your redirect to HTTPS takes effect.

What should you keep in mind with Strict-Transport-Security?

Roll it out carefully. Start with a short max-age, check that every subdomain works over HTTPS, then increase it. With preload and a submission to the browser preload list, browsers enforce HTTPS even on the very first visit. Removal from that list takes months, so only preload once you are sure every subdomain, including old ones, supports HTTPS.

What does an example of Strict-Transport-Security look like?

Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.