How to redirect your website to HTTPS

If you have installed an SSL Certificate on your hosting account and wish to force all your web traffic to the https protocol, you need to copy and paste the following code into your .htaccess file. You will find the .htaccess file in the public_html directory of your web hosting cPanel.

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

Was this article helpful?

Related Articles

Leave A Comment?

This site uses Akismet to reduce spam. Learn how your comment data is processed.