In MDN HTTP Strict Transport Security (HSTS), it has an example of HSTS settings as below
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
where I can find the corresponding mean of max-age
and includeSubDomains
in RFC 6979, but it does not have the meaning of preload
.
I have tested in latest Chrome and Firefox, and it seems that preload
does not do anything at all. With and without preload, on requesting http request, both trials if using Chrome, can find 307 Internal Redirect
made by Chrome browser without requesting to the server, which is what HSTS expect.
So what is the purpose of preload
?
In addition, even if I add HSTS header, it will still have a chance to be attacked, on the first time the user visit the website with HTTP. How can we mitigate from this risk? That is, how can we tell the browser to add the domain to HSTS list before any request are sent to the server?
P.S.
I have found https://hstspreload.org/, which if I need to register the domain, requires me to add max-age
and preload
directive. Is it the reason why preload
is necessary? And this should be the page where I should add my domain to ensure new user are safe from SSL Stripping Attack?