website development
buyer location

Arsal From Location Just
Purchased Starter Plan

Visit Starter Plan

How to redirect a website from HTTP to HTTPS in cPanel

How to redirect a website from HTTP to HTTPS in cPanel


Secure socket layer (SSL) is very important for websites these days, hostcry offers free SSL on every package. If you browse your website on google chrome and you don’t have SSL (not redirected to HTTPS) google will show warnings that the website you are visiting is unsafe. And having an SSL certificate is also a ranking factor.

If you don’t have an SSL certificate installed on your domain first you need to install an SSL certificate.

Now that you have an SSL certificate but your users can visit both versions of your website using HTTP and HTTPS, you need to redirect users to HTTPS.


How to redirect from HTTP to HTTPS in Cpanel:

  1. Login to your cPanel.

 domain section in cpanel

  1. Search for the domains section.
  2. Click on domains in the domains section.
  3. This will open all of your domains on the right side of your desired domain you will see the option to enable “force HTTPS redirect”. Just enable SSL.

 Enable HTTPS redirect

Now your website should be redirected to HTTPS.


How to redirect the website to HTTPS using a .htaccess file?.


  1. Open file manager in your Cpanel.
  2. Go to your website directory and look for the .htaccess file.
  3. If you can’t find the .htaccess file it might be missing or hidden.
  4. First show all hidden files.


How to show all Files in cPanel.

Click on Settings at the top right corner of your file manager screen.

Click on show all hidden files and click save.

 click on settings in file manager and show hidden files

  1. If you still can’t find it you need to create a .htaccess file.


How to create a .htaccess file in cPanel.

Click on + File on the top left side of your file manager screen.

Enter .htaccess and click save.

 create new file in file manager

  1. Right-click and edit the file.

 edit file


  1. Enter the following code in your .htaccess file.


RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


If you have an existing .htaccess file.

  • Do not duplicate RewriteEngine On.
  • Make sure RewriteCond and RewriteRule follow already written RewriteEngine On.

If you Like this content consider sharing it.