Hey ya!
@Nuxwin thanks. So I'll use 307 for HSTS redirects to https and 301 as default. About the max-age, this param will be variable.
307 means it is a temporary redirect, this means that the next time a user would go to a HSTS-enabled website, it will retry connecting to the http://domain.tld. This would surpass the goal of htst... right?
I think it should be a permanent redirect (301). If you don't agree, let's see if 303 would work...
Anyhow, seeing the different opinions I think this should be a configurable option (by admin/reseller/user? let's talk about that, would it be beneficial for a user to change it, or maybe just reseller/admin).
I tried my own website with max-age set below 15552000.
Then the test says Strict Transport Security (HSTS) [b]Yes[/b] max-age=15551999 [b]TOO SHORT (less than 180 days)[/b]
I'll send you an URL to my test.
People clearly have different needs, I myself would set it to a great value, maybe a year... This has some user implications, but lowering the value also surpasses the use of HSTS.
I think this should be configurable in the CP too, maybe not by the user, but on reseller/admin level. A user can screw up their website really easy by doing this...
A note to our loved devvers: I think there should be a warning when enabling HSTS with the possible implications with a link to some documentation. (Maybe we should create a little (fancy, happy, beautiful) knowledge base so we can refer to it from the panel (either hosted in the panel itself or on i-mscp.net).