How to Force my Website to use SSL Certificate

If you have a secure certificate (SSL) on your website, you can automatically redirect visitors to the secured (HTTPS) version of your website to make sure their information is protected.

To force SSL connections to a site, you need use the cPanel File Manager to add or edit the .htaccess file for the folder containing the site.

You need to ensure that you show hidden files (dotfiles) when opening the File Manager.

Adding the following code at the top of your .htaccess file, automatically redirects visitors to the HTTPS version of your site:


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


If you have an existing .htaccess file:
  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.


Looking for reliable and affordable web hosting with Dedicated Customer Support?

Get your web hosting today and receive a FREE domain for Life. All plans come with our 30 Day Money Back Guarantee!
  • cPanel, SSL-Certificate, Websites
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Domains Not Covered by ID Protection

This list is continuously changing with the release of new domain extensions. We cannot guarantee...

What is the website migration service?

Website migration is a free service offered with each of our hosting plans – we seamlessly move...

What is the website migration service?

Website migration is a free service offered with each of our hosting plans – we seamlessly move...

Does an SSL certificate require a dedicated IP address?

No. All our servers support Server Name Indication protocol (SNI) so a dedicated IP is not...

Does an SSL certificate require a dedicated IP address?

No. All our servers support Server Name Indication protocol (SNI) so a dedicated IP is not...

Powered by WHMCompleteSolution