How to setup https redirection to force SSL in cPanel

It is always advised to use an SSL certificate with your domains and access it via HTTPS. By default, the browser access will be using HTTP protocol and we need to set up a redirection. There are multiple ways are available to configure the same. Basically, it works with a '.htaccess' file in the home directory, but we can add it using different ways. If you are good with the command line, you can directly add an htaccess file, if it is a WordPress website, you can use plugins and I am showing here about how to do it from cPanel. You can watch the video tutorial by clicking here.

  1. Login to the cPanel interface and choose the 'Redirects' option under the 'Domains' section.



  2. Select the 'Permanent(301)' option from the 1st box and then choose the domain you need to set the redirect. 
  3. Next is to choose the folder. If you are looking to redirect the main domain, leave the next field blank. If you are looking to redirect a folder inside the home directory, give it there after the / provided there by default. In the following image, a redirection is set to https://testdomain/com/demo.



  4. Once it is added, you can see them at the bottom of the page and we can remove them if needed. 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install and Use Docker on Ubuntu 16.04

Introduction Docker is an application that makes it simple and easy to run application processes...

Change Main IP of the server :: Vesta Panel

If we are changing the main IP of a server installed with Vesta panel, we can use the following...

cPanel: Apache-FastCGI Data Timeout Error

If you are using a cPanel server and have FastCGI enabled in Apache, you might be facing the...

Domainkey installer in cPanel

You can use the following cPanel script to install domainkey for an account...

Email issues :: Common Troubleshooting Steps

Here I will discuss some common errors and their solution: We are using a mail relay setup for...