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
- Login to cPanel
- Navigate to Domains section and click on Domains.
- Enable Force HTTPS Redirect as shown in below screenshot.
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
- Login to cPanel
- Go to Files > File Manager
- New tab or windows will open, if you are not in public_html directory, navigate manually.
- Now click on “Setting” menu on the top right corner.
- A new pop up screen will appear, click mark on “Show Hidden Files (Dotfiles)” and click save.
- Look for .htaccess file, right click on it and click on “Edit Code“. A Dialogue box may appear, just click “Edit” button to continue.
- Copy and paste the below code to your existing code.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] - Click on “Save Changes“.
- 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.