Press enter to see results or esc to cancel.

How to force to load https using .httaccess file

If you have installed SSL certificate to your domain but still you are seeing your site is still loading in http:(insecure url) instead of  https: (secure url).  After activating SSL, you just need one more step to load your site in https protocol, that is you have to force users browsers to load site in secure url (https). You can do it in following ways-

1. Adding 3 line of code in .htacces file:

These 3 lines of code to your site’s httaccess file will force browsers to load SSL secured url

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
The .htaccess file needs to be located inside the site’s document root folder.
If your website is in a sub folder, then the .htaccess should be placed in the corresponding sub folder.
You can create or edit the .htaccess file either via FTP, or using with the File Manager available in cPanel.

2. Using a WP plugin:

If your site is built on WordPress CMS, then you can use a plugin called Really Simple SSL