How to enable HSTS on a domainname?

"To enable HSTS on your domain name, place or edit your .htaccess file via the file manager. This file is located in the /public_html/ directory.

Add the following line to the top of the file if you are only using HSTS on the domain name:

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

Add the following line to the top of the file if you are also using HSTS on subdomains:


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

  • hsts, apache, htaccess
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

PHP versie aanpassen

Om de PHP versie van je domein aan te passen doe je het volgende:Login in DirectAdmin -> Klik...