cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Magento 1.9 Frontend to SSL https:

Converting Magento 1.9 Frontend to SSL https:

I'm converting a Magento 1.9 website from http: to fully secure https: frontend.

Ive used the following code at the top of the .htaccess file.

 

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

 

I would just like to verify that to preserve link authority does this code create a permanent 301 redirect from http: to the new https: urls?

 

Can anyone confirm this is the case or is there something else that needs to be done to transfer url link authority?

 

Thanks

 

Nick

4 REPLIES

Re: Converting Magento 1.9 Frontend to SSL https:

A 301 redirect should be good enough to achieve your aim.
James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Converting Magento 1.9 Frontend to SSL https:

Hi James,

 

Thank you for your answer but does this code in the .htacess file generate a permanent 301  redirect for all the incoming http: links to https: links?

 

kind regards

 

Nick

 

Re: Converting Magento 1.9 Frontend to SSL https:

It should. Give it a try and see if the redirect works properly for your website.
James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Converting Magento 1.9 Frontend to SSL https:

You can include this line in your virtual host file located in etc/httpd/conf/httpd.conf, sometimes it located in etc/httpd/conf.d/yourdomain.conf

 

RewriteEngine On
Redirect permanent / https://yourwebsite.com/

So your conf file will look like this

 

 

<VirtualHost *:80>
RewriteEngine On
Redirect permanent / https://yourwebsite.com/
    ServerName yourwebsite.com
    ServerAlias *.yourwebsite.com
    DocumentRoot /var/www/html/yourwebsite.com
</VirtualHost>

Hope this helps