Categories
Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
If you have an existing .htaccess file:
RewriteEngine On.RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.
Will it work without me paying for an SSL certificate?
Yes, it will work without you paying for SSL
Meanwhile, you need to confirm from your hosting provider if the AutoSSL is activated in your cPanel account
does your host have auto ssl
Yes, our cpanel/whm servers has autossl