HSTS Pins HTTP Origins to TLS After First Secure Contact
HTTPS protects a connection only after the client has selected HTTPS and completed TLS. A user who enters a bare hostname, follows an http:// bookmark, or receives an HTTP link can still begin on cleartext HTTP before a server redirects the request. HTTP Strict Transport Security (HSTS), defined in RFC 6797, moves that redirect decision into the user agent after the origin has established a policy over a secure connection.