! Not Secure
This message dosent look good next to your domain url on a web browser. To make your website secure, you need to install an SSL certificate.
If you have installed your SSL certificate and still you are getting the above message, then you simply have to redirect you http to https using the .htaccess file in the root directory of the web server.
Here is a complete guide to redirecting http to https using .htaccess.
Nowadays, HTTPS is a necessity. It symbolizes trust. A warning appears when a visitor loads a website running on HTTP in Google Chrome, Firefox, and other popular browsers. Sites marked as unsecure are marked as such.
The importance of using secure sockets for eCommerce stores cannot be overstated.
Using .htaccess, I will show you how to force a redirect from HTTP to HTTPS in this post.
Using cPanel File Manager, edit the .htaccess file:
- Open your cPanel account
- Click on File Manager from the Files Tab
- Find the “Setting” at the top right corner of the page, click on it
- Click on the Document Root for (the domain name) and check the Show Hidden Files (image below)
- Save to update the File Manager
- Find the public_html file and click on it
- On the next page, you will find the .htaccess file
- Click once on the .htachess file and then click on the “Edit” at the top bar
- A warning box will pop up, but click on Edit
- On the next page, a code editor will open
- Edit the code
- Save the file
Redirect HTTP to HTTPS
Redirect All Web Traffic
Add this code below the existing code in your .htaccess file.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]