HTTP Strict Transport Security (HSTS)

Return to HTTPS, TLS, SSL

Snippet from Wikipedia: HTTP Strict Transport Security

HTTP Strict Transport Security (HSTS) is a policy mechanism that helps to protect websites against man-in-the-middle attacks such as protocol downgrade attacks and cookie hijacking. It allows web servers to declare that web browsers (or other complying user agents) should automatically interact with it using only HTTPS connections, which provide Transport Layer Security (TLS/SSL), unlike the insecure HTTP used alone. HSTS is an IETF standards track protocol and is specified in RFC 6797.

The HSTS Policy is communicated by the server to the user agent via an HTTP response header field named Strict-Transport-Security. HSTS Policy specifies a period of time during which the user agent should only access the server in a secure fashion.: §5.2  Websites using HSTS often do not accept clear text HTTP, either by rejecting connections over HTTP or systematically redirecting users to HTTPS (though this is not required by the specification). The consequence of this is that a user-agent not capable of doing TLS will not be able to connect to the site.

The protection only applies after a user has visited the site at least once, relying on the principle of "trust on first use". The way this protection works is that when a user entering or selecting an HTTP (not HTTPS) URL to the site, the client, such as a Web browser, will automatically upgrade to HTTPS without making an HTTP request, thereby preventing any HTTP man-in-the-middle attack from occurring.

Web Security: HTTPS, TLS, SSL, HTTP Strict Transport Security (HSTS), HTTP Security, HTML Security, CSS Security, OWASC Top 10, JavaScript Security, TypeScript Security, React Security, Angular Security, Vue.js Security, Next.js Security, Node.js Security, NPM Security, Express.js Security, Deno Security, WebAssembly / Wasm Security, Awesome Web Security. (navbar_web_security - see also navbar_security, navbar_tls, navbar_javascript_security)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.