Switch Entire Magento Store Over to HTTPS
Since Google made the declaration that serving your’s site pages over a safe convention (HTTPS) will turn into a positioning element back in August 2014 , numerous brands have rolled out the important improvements to serve their whole site over HTTPS (instead of just pages that contain conceivably delicate information like checkout, login and account URL’s).
Despite everything we don’t consider this basic as how it weighs up as a positioning element is still moderately minor however throughout the following couple of years, it is most likely reasonable to say that we can anticipate that this will be fortified as a positioning variable yet let’s be honest, there is unquestionably no damage in serving all pages of your site to your clients safely.
If you’re running a Magento store, follow the below steps to switch over to an all-HTTPS Magento store.
First up, we need to configure Magento to run all the time on HTTPS so navigate to the following location in your Magento back office:-
System > Configuration > GENERAL > Web
Open up the ‘Unsecure’ and ‘Secure’ tabs from the accordion and modify the ‘Base URL’ in each to include the HTTPS protocol like the below:-
With these now in place, every page on the frontend of your Magento store should be loading on HTTPS.
Next though, you’ll need to ensure that anyone accessing your web pages on the old HTTP URL’s get redirected to the HTTPS counterparts by inserting this in your Magento root .htaccess:-
################################################### ## Redirect all URL's to HTTPS plus handle www ################################################### RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Ensure the above is inserted somewhere shortly after RewriteBase /
As with most things Magento, there will of course, be a number of ways of implementing the necessary to serve your entire Magento store over HTTPS. You may also find that the above rewrite rules in the .htaccess file conflict with existing rules.
If you want to share your thoughts or experience, please leave a comment below.