Magento 2 admin this webpage has a redirect loop

In my case, I was importing an already existing Magento 2 database. The reason I was getting the error was because of the cookie domain in the database. Go to your database and look in the table core_config_data. You should see a path called web/cookie/cookie_domain. Make sure the domain matches the one you installed Magento 2 on. Ex: If you installed Magento 2 on local.dev/<magento-root> the entry in web/cookie/cookie_domain should be local.dev.


Browsers do not support cookies on top level domains like localhost. Please reinstall Magento on different hostname (ex. magento.dev).

Also, Magento supports only Linux. So better to use Vagrant for development. You can use any exists preconfiguret vagrant instance that do all work for you


Had redirect loop problem on Magento2 with a valid domain name after switching to https.

Check web/secure/use_in_adminhtml and web/secure/use_in_frontend settings in core_config_data, they both should be set to 1.

Tags:

Admin

Magento2