How to enable HTTP Strict Transport Security (HSTS)

How to enable HTTP Strict Transport Security (HSTS)

If you are getting a warning like

N subdomains don’t support HSTS

or you simply want to turn your HTTP Strict Transport Security (HSTS) on.

All you need to do is to add the code below on your .htaccess

(For Dummies)
What is HTTP Strict Transport Security (HSTS)?

HTTP Strict Transport Security (HSTS) instructs web browsers to only use secure connections for all future requests when communicating with a web site. Doing so helps prevent SSL protocol attacks, SSL stripping, cookie hijacking, and other attempts to circumvent SSL protection.

To learn more about HTTP Strict Transport Security (HSTS) visit https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security