How to redirect HTTP to HTTPS in cPanel

HTTPS is a secure communication over a widely used computer network on the Internet.

There are many WordPress users who are switching from HTTP to HTTPS and the reasons are as follows:

1. Google has announced that HTTPS will be considered a Google search ranking factor.

2. The new HTTP / 2 protocol helps improve the performance that HTTPS requires due to browser support. Bluechipspace supports the HTTP / 2 protocol on all servers.

3. HTTPS is extremely secure and visitor data remains fully encrypted.

4. Help build trust by enabling the green padlock in the address bar of the visitor's web browser.

5. If someone visits an HTTPS website and goes to an HTTP website, the referral data will not be saved in Google Analytics. It is usually combined with "direct traffic". On the other hand, if someone switches from one HTTPS site to another HTTPS site, the referral data will be saved. So, migrating from HTTP to HTTPS gives you more accurate reference data.

 

Redirect HTTP to HTTPS in cPanel using the redirect option

1. Login to your cPanel account.

2. Go to the Domains section and click Redirects.

https redirects 


3. Select the domain you want to redirect from https?://(www.)? Drop-down list.

4. In the Redirect to field, enter the full URL of the page you want to redirect to. Finally, click on the Add button.

add https redirects 


A success message will flash on the screen, indicating that the domain is being redirected to the destination domain.

domain https redirects 


You will also find a few options when choosing to redirect HTTP to HTTPS in WordPress.

If you are a Bluechipspace customer, you can force HTTP to HTTPS via cPanel or by modifying the .htaccess file from your File Manager.

 

Redirect HTTP to HTTPS via cPanel without www using .htaccess

1. Login to your cPanel account.

2. Click File Manager in the Files section.

https redirects file manager 


3. Search for Public_html and select the .htaccess file. Click the Edit button.


https redirects public_html


4. A pop-up window will appear. Click Edit.

5. Add the following code to the file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] 


Once done, click Save Changes.

 https redirects htaccess editor



Redirect HTTP to HTTPS via cPanel using www using .htaccess

Follow the steps above and add the code below in the file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^milesweb.in [NC]
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]


Once done, click Save Changes.


https redirects htaccess editor 

 

Redirect all HTTP to HTTPS using .htaccess

If your web server is running Apache, you can easily redirect all HTTP traffic to HTTPS by adding the following code to your .htaccess file. This is the recommended way to redirect WordPress running on Apache.

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

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Force Redirect HTTP to HTTPS in WordPress?

Change The WordPress & Site Addresses Setting 1. Log in to WordPress Dashboard 2. Select...

Powered by WHMCompleteSolution