It’s a good idea when hosting a web page to secure it with an SSL certificate. Once you have your SSL certificate installed on your server, it’s time to force your users to use HTTPS instead of HTTP.

In the root directory of your website (for cPanel users this would be in your public_html folder) edit the .htaccess file there. If you don’t see a .htaccess file, you may have to create it.

Inside your .htaccess file, add the following text:

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

Save and exit the .htaccess file, and try accessing your website using HTTP. If all has worked successfully, you should be redirected to the HTTPS version of your site!

Leave a Reply

Your email address will not be published. Required fields are marked *