cancel
Showing results for 
Search instead for 
Did you mean: 

How to Setup HTTPS for complete website on Magento 2

How to Setup HTTPS for complete website on Magento 2

How to Setup HTTPS for complete website on Magento 2
 
I want my complete website to redirect through HTTPS as from October, Google tags your website "Not Secure" if your homepage isn't setup as HTTPS.
 
I tried the following settings in the Admin Dashboard of my Magento 2 store:
Stores > Configuration > Web > Base URLs (Secure), but its still not working.
Tags (3)
1 REPLY

Re: HTTPS redirect for Magento website

Well traditionally the above mentioned procedure should work. However if its not, then setup HTTPS Redirect in .htaccess file in the root directory of website. 
 
Add the following code at the top of the.htaccess file.
 
RewriteEngine On 
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
 
This code will forcefully redirect non-secure urls through secure HTTPS URLs. Give it a try and tell us if you need any other sort of help from our magento developers.