Categories
all cpanel and wordpress tutorials

How to enable HSTS (HTTP/2) on any site (Quick Tip)

Keeping this one short, if you are running a website on an Apache, Nginx or LiteSpeed webserver, you want to paste the following line of code to the top of your .htaccess file.

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

Once you have done that, clear your browser cache and by using a HTTP/2 tester, you should see that your website is now enforcing HTTP/2.

Leave a Reply

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.