Magento Admin (Backend) redirect loop


I cannot access the Magento Admin due to a redirect loop. (see URL)

My setup is on a Public Server (not localhost).



The redirect loop is the result of your HTTPS connection redirecting to HTTP. And your HTTP connections redirecting to HTTPS. Resulting, in your issue.


I can tell because when I try to load the URL in my browser, the Inspect Element tool shows the files that it’s trying to load over and over again in the Status and Scheme columns.


My Guess

My guess is that you’ve configured your Apache or Nginx configuration to force HTTPS - Whilst your Magento settings are still set to force HTTP.

Therefore, you’re looking at one of 2 potential solutions based on my guess:

Option A

Fix your Apache/Nginx configuration so that it doesn’t force HTTPS. You can revisit this option from within the Magento Admin once you have resolved your issue.

Option B (Recommended / Easier)

Update your Magento Admin settings from the Command Line Interface.

I think you can simply run the following command from the Magento root directory as the “Magento” user:

bin/magento config:set web/secure/use_in_adminhtml 1

Then clear the cache

bin/magento cache:clean

Note: You may need to clear the cookies in your browser.

Thanks to join me to this work
I come back