I need to examine a list of websites to check if they support the HSTS policy or not.
I grabbed their response headers. However, I am confused now because it appears that HSTS policy subscription can be done through preloaded lists and not only headers (I might be wrong but I am not getting this point).
Does checking the websites response headers (i.e. look for the Strict-Transport-Security
header) gives me a correct answer to the questions: does the website support the HSTS policy?
Because there is a preloaded list. I am not sure: can a website subscribe to the list without sending the HSTS header? i.e. can a website support the HSTS policy without sending the Strict-Transport-Security
header?
I checked Chrome's page for HSTS preloaded list subscription here. It says:
If your site is committed to HTTPS and you want to preload HSTS, we suggest the following steps: [...] Add the Strict-Transport-Security header to all HTTPS responses and ramp up the max-age in stages, using the following header values: [...]
Can anyone clarify to me. First, the word suggest
in Chrome's page is not clear. Is it a must? or optional? Second, if it is a must, then, if the website that want to subscribe to the list needs to send the HSTS header anyways, why does it subscribe to the list? Is this list just to provide a mean to protect the first connection (which can not be protected using the HSTS header method)? or is it a mean of double-check or something like that? Please, clarify to me.
The bottom line question: Is it enough for me to check the headers to say if a given website support the HSTS policy or not, without checking the website against the Chrome preloaded list?
If checking the website against the Chrome's HSTS preloaded list is required, can you please point to me how to automate this (I can not perform this manually as I have a list of websites not one or two). Also, how to check the website against the list of a specific date in the past (few months ago).