Redirect HTTP to HTTPS1 min read

Redirect HTTP to HTTPS1 min read

After installing a SSL certificate on your webpage, you can automatically redirect the user to the https-version of your web site.

Open .htaccess – usually located in the public_html-folder, and add the following code

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Remember to change https://www.yourdomain.com/ to your actual domain name.

Leave a Reply

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