

The HSTS policy is applied to the domain of the issuing host as well as its subdomains and remains in effect for one year.Strict-Transport-Security: max-age=31536000 includeSubDomains.The HSTS policy is applied only to the domain of HSTS host issuing it and remains in effect for one year.Strict-Transport-Security: max-age=31536000.There are semantically distinct ways to send HSTS headers, as defined in RFC 6797: Hence, it is advisable to protect as many domains/subdomains as possible using an appropriate HSTS policy. Hackers cannot, however, intercept valid HTTPS traffic over any of the domains/subdomains. Web applications should operate under the assumption that a hacker can run MITM over a plaintext HTTP connection for any domain/subdomain, for example with the help of spoofed DNS entries.

HSTS serves as a secure umbrella against all of these attacks. It also enforces strict security like preventing mixed content and click-through certificate overrides, and it protects against web server mistakes like loading JavaScript over an insecure connection. It protects users against passive eavesdropper and active man-in-the-middle (MITM) attacks. HTTP Strict Transport Security ( HSTS) is a method for web applications to ensure they only use TLS to support secure transport.
