Get 33% off Website Hosting using code 33OFF at checkout. View plans: https://slashy.host/web
In the following tutorial, we will explain how to force SSL using your .htaccess file.

First, head over to cPanel and click File Manager. You will be presented with a list of files as well as some settings on the top. Click the settings button on the top right of the page and make sure "Show hidden files (dotfiles)" is checked, then click save. Next click the public_html folder and create a new file called .htaccess this will be used to store our settings in.

Right-click .htaccess and click edit, then enter the following lines before clicking save.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


And that's it! Users will now be forced through HTTPS when visiting your website!
Was this article helpful?
Cancel
Thank you!