How to Redirect HTTP to HTTPS

How to Redirect HTTP to HTTPS

Google Chrome and Mozilla Firefox have started showing insecure warning on the website which do not have an SSL Certificate. Without SSL your website will show insecure sign to visitors. Our Web Hosting plan also include a FREE SSL certificate. FREE SSL is included on all plans like, Cloud Hosting, Reseller Hosting, Windows Hosting etc.,. After you have installed SSL Certificate on your web hosting, it is necessary to redirect all your web traffic from HTTP to HTTPS. It is very simple to Redirect HTTP to HTTPS using .htaccess file. It is also very important to Redirect HTTP to HTTPS for SEO factor. IF you redirect your HTTP to HTTPS then you Google indexed file will be changed automatically.

To redirect HTTP to HTTPS you need to edit the codes in .htaccess file. Here i will show you how to redirect HTTP to HTTPS.

Method 1: Using cPanel Domain

  1. Login to cPanel
  2. Navigate to Domains section and click on Domains.
    Domain in cPanel
  3. Enable Force HTTPS Redirect as shown in below screenshot.
    Force HTTPS Redirect in cPanel - eHostingServer
    Please note SSL must be installed before enabling. Also it will not work addon domain. For addon domain follow below method.

Method 2: Edditing .htaccess in cPanel using File Manager for Redirecting HTTP to HTTPS

  1. Login to cPanel
  2. Go to Files > File ManagerNew cPanel File Manager
  3. New tab or windows will open, if you are not in public_html directory, navigate manually.Redirect HTTP to HTTPS
  4. Now click on “Setting” menu on the top right corner.
  5. A new pop up screen will appear, click mark on “Show Hidden Files (Dotfiles)” and click save.Redirect HTTP to HTTPS
  6. Look for .htaccess file, right click on it and click on “Edit Code“. A Dialogue box may appear, just click “Edit” button to continue.Redirect HTTP to HTTPS
  7. Copy and paste the below code to your existing code.
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  8. Click on “Save Changes“.
  9. Delete Cache and Cookies and test your website.

I hope this works for you all, if you still have an issue please contact our support team via support ticket. Most of the web hosting charge for SSL certificate though we are providing free SSL certificate on all plan. Please check our web hosting plans if you need one for yourself.

Leave a Reply

Your email address will not be published. Required fields are marked *