Redirect entire pages on http to https in magento

Redirect entire pages on http to https in magento

July 17, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Redirect entire pages on http to https in magento

Redirecting Entire Pages from HTTP to HTTPS in Magento

Magento Logo

If you’re running an e-commerce store on Magento, secure communication is essential for protecting customer data and building trust. In this guide, we’ll walk through the process of redirecting your entire website from HTTP to HTTPS using Magento’s built-in configuration.

Configuring Base URLs in Magento Admin

Log into your Magento admin panel and navigate to System > Configuration. Under the General section, click on Web.

Magento Web Configuration

In the Base URLs section:

  • In the UnSecure tab, set your Base URL to http://www.xyz.com.
  • In the Secure tab, set your Base URL to https://www.xyz.com.

Next, scroll down and ensure that these additional settings are enabled:

  • Use Secure URLs in Frontend: Yes
  • Use Secure URLs in Admin: No (unless you’re using a secure admin panel)

Save your configuration.

Understanding Magento’s SSL Setting

Magento provides an Offload header option to handle SSL. In most cases, if your server is already configured for HTTPS, the default setting of SSL_OFFLOADED should work fine. However, if you encounter issues, consult with your hosting provider or system administrator to ensure the SSL certificate is properly installed and activated.

Modifying .htaccess File

By default, Magento doesn’t require additional configurations in the .htaccess file for HTTPS redirection. The built-in settings we’ve configured above should handle most scenarios automatically.

However, if you’re still facing issues where your site is not redirecting to HTTPS or is displaying a “Not Secure” warning in browsers:

  1. Open your .htaccess file using an FTP client or file manager.

  2. Look for the following line (it may be commented out with #):

    #RewriteCond %{HTTPS} off
    
  3. Remove the hash (#) to uncomment this line.

  4. Save and close the file.

Checking HTTPS Redirection

After implementing these changes, visit your website using HTTP (e.g., http://www.xyz.com). Magento should automatically redirect you to the corresponding HTTPS version of the page.

However, if a particular product or category is not redirecting correctly:

  • Check your Magento configuration for that specific page.
  • Ensure there are no conflicting settings in custom modules or third-party extensions.
  • Verify that all images and assets on the page have been updated with absolute URLs (starting with https://).

Conclusion

Redirecting a Magento site from HTTP to HTTPS involves configuring base URLs, enabling secure URL options, and potentially adjusting the .htaccess file. Remember to test your entire website thoroughly after making these changes.

Contact us for professional Magento development services if you need further assistance or custom solutions tailored to your business needs.

Happy securing!

Themes Admin Configuration Customers

Our network