A browser may begin with an insecure HTTP connection, even when a website supports HTTPS. An HSTS response header tells the browser to use HTTPS for subsequent connections, helping prevent attackers from stripping an HTTP-to-HTTPS redirect. section 9.3
The protection has an important boundary:
- After receiving the policy, the browser uses HTTPS for later connections to that website. section 9.3
- The first connection can still be intercepted unless the user starts with HTTPS, because the attacker may remove the redirect. section 9.3
Redirect interception
A user types a website address without HTTPS. The server redirects the request to HTTPS, but an attacker intercepting that first HTTP connection can remove the redirect. HSTS is intended to prevent this on later connections. section 9.3




