How to force SSL with .htaccess

You can force an HTTPS connection on your website by adding these rules in your website's .htaccess file:

If your website is in a subfolder, use this code instead:

Where yourdomain.com is your actual domain name and folder should be replaced with the name of the subfolder where your site is situated.

You can edit the .htaccess file either via FTP, or using with the File Manager availalbe in cPanel.

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!