This article provides a solution for the issue when you access Magento store front or backend and you get a blank page or redirect loop.
Affected products and versions
- Magento Commerce Cloud, all versions
- Magento Commerce, all versions
- Magento Open Source, all versions
Steps to reproduce
Open a store front or Admin page.
The page opens.
The page is blank or displays the "This webpage has a redirect loop" error message.
One of most probable reasons for the issue is that Magento is set to redirect from unsecure URL to secure URL, but an unsecure URL is given as the value for the secure URL setting.
To fix the issue, you need to correct the value of the secure link.
To make sure this is the cause of the problem, take the following steps:
- Check the
web/secure/use_in_adminhtml(if you have the blank/loop redirect issue in Admin) or
web/secure/use_in_frontend(if you have the blank/loop redirect issue on the store front) value in the
web/secure/enable_upgrade_insecureis set to "1', then Magento is setup to add the response header
Content-Security-Policy: upgrade-insecure-requests, thus instructing browsers to use HTTPS, redirecting all queries that come over HTTP to HTTPS, for both Admin and store front.
web/secure/use_in_adminhtmlis set to "1", Magento returns HTTPS redirects for all HTTP requests for the Admin pages.
web/secure/use_in_frontendis set to "1", Magento returns HTTPS redirects for all HTTP requests for the store front pages.
- Check the
web/unsecure/base_urlvalues in the
'core_config_data'table. If they both start with
http, then you need to correct the "secure" value.
Fixing the issue:
- Set the value starting with
- For the changes to be applied, clean the configuration cache by running the following command:
php <your_magento_install_dir>/bin/magento cache:clean config