In our opening to this series, we discussed some of the reasons for Security Headers. In this post we will describe in more detail the need for the HSTS header. Simply put, the HSTS header forces browsers to communicate using a secure (HTTPS) connection. This primarily eliminates the “man-in-the-middle” attack described by Moxie Marlinspike in which an SSL certificate chain can be spoofed. Additionally the HSTS header can eliminate serving HTTP pages on a site that should be HTTPS only.
Directive |
Description |
max-age=expireTime |
The time, in seconds, that the browser should remember that this site is only to be accessed using HTTPS |
includeSubDomains |
If this optional parameter is specified, this rule applies to all of the site's subdomains as well.
|
Examples:
The preload directive indicates that the site is present on a global list of HTTPS-only sites. You, as a site owner will need to register the site prior to using this directive. Preloading is intended to speed up page loads and eliminate the risk of "man-in-the-middle" attacks when a site is visited for the first time. As a word of caution, getting your domain removed from the global list can be a tedious process, so be sure this is what you want to do.
Additional Notes:
Interested in learning more?
Contact Us