Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

Can I enable HSTS? - SIRSTEVEHQ CP

The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) lets a website tell browsers that it should only be accessed using HTTPS, instead of using HTTP.

You can enable this by adding the following to your .htaccess file:

Header set Strict-Transport-Security "max-age=5184000; includeSubDomains; preload"

The 'max-age' is the time in days you want the warning to be cached for, the above would set that to a default of 60 days.

Be aware that if you set this header, the site will only ever load over HTTPS.

For instance, while people can usually click through a browser warning about a name mismatch or expired certificate, browsers do not allow such a click through for hostnames with an active HSTS header. It also means that if they ever move the site to a web hosting provider that doesn't support HSTS or if they wish to remove the certificate, they cannot do so and their site will be unavailable.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I identify a SIRSTEVEHQ CP phishing email?

Recently, we’ve noticed an increase in the number of phishing emails targeting our customers....

How do I set up Automatic Timeline Backups? - SIRSTEVEHQ CP

With our Timeline Backups product, automatic snapshots of your website files and databases are...

What is HTTP Keep-Alive? - SIRSTEVEHQ CP

HTTP Keep-Alive, also known as HTTP persistent connection, is a mechanism used to maintain an...

How can I clone a site with Timeline Backups? - SIRSTEVEHQ CP

Timeline Backups allow you to restore data between hosting packages, making them an ideal tool to...

Should I transfer my site to the WordPress platform? - SIRSTEVEHQ CP

Yes - absolutely, to get the best performance from a WordPress site it's best to transfer it to...