Redirect my cPanel website to HTTPS

Once you’ve installed your SSL certificate on your Hosting account, you’ll need to make some changes to your .htaccess file so that it automatically redirects visitors to an HTTPS version of your site.

Please note: this process applies to our Web Hosting and Premium Hosting products.

Step 1 of 11

Start by logging in to your Control Panel and scroll down to ‘Web Hosting’. From there, select Manage.

General Control Panel


Step 2 of 11

On the next page, select Manage for the account you wish to use.

Web Hosting Manage


Step 3 of 11

Select the three-dot icon for the package you want to edit. From there, choose Settings from the drop-down menu that appears.

cPanel Admin


Step 4 of 11

Select File Manager in the account dashboard.


Step 5 of 11

Select Settings from the cPanel File Manager in the top-right corner.



Step 6 of 11

Ensure that the Show Hidden Files (dotfiles) option is checked, and select Save.



Step 7 of 11

Double-click public_html from the File Manager dashboard.
File Manager


Step 8 of 11

Select your .htaccess file and click Edit.


If you don’t have a .htaccess file, click File+, name the file .htaccess and click Create New File.


Step 9 of 11

On the pop-up menu that appears, click Edit.



Step 10 of 11

If you already had a .htaccess file, you’ll need to insert the following code into it:

RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\
RewriteRule ^(.*)$$1 [R,L]

Be sure to replace with your own domain name though!

If you had to create a new .htaccess file, you’ll need to insert the following code into it:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\
RewriteRule ^(.*)$$1 [R,L]

Again, make sure that is replaced with your own domain name.


Step 11 of 11

Once done, select Save Changes, followed by Close in the top-right corner.