Magento Admin url keep on redirecting and shows the below error. This webpage has a redirect loop

Frontend is working fine, but the problem is with the magento admin url.

Also this problem occurs after implementing patch.

  • 1
    share the patch number. Commented Sep 25, 2015 at 9:06
  • Below Patches were manually implemented by my frnd prabhu.. SUPEE 1533, SUPEE 5344, SUPEE 6482.... htaccess file not changed. But not sure this is due to patch
    – vinothavn
    Commented Sep 25, 2015 at 9:08
  • 1
    check admin store url in core config table and also check any thing present in htaccess file Commented Sep 25, 2015 at 9:10
  • Ok. But htaccess file not changed. I will check admin store url
    – vinothavn
    Commented Sep 25, 2015 at 9:15
  • 1
    You should add more info, like what configurations do you have, when did the problem start? is it production or local etc.
    – FROSIT
    Commented Sep 25, 2015 at 9:41

3 Answers 3


I found the cause for the issue. It is due to enabling of SSL.

Use the below code in .htaccess for Apache server.

<IfModule mod_ssl.c>
    SSLOptions StdEnvVars
    SetEnv HTTPS "on"

Using nginx with php-fpm add these lines to nginx.conf:

fastcgi_param HTTPS on;

I had problem with 302 loop, spent lots time to find source, nothing found, had remove memcached, varnish, forced apache to work alone on bitnami gcloud, so l=place here related answer:

In problem to open admin pannel of magento 2, and in apache logs you see infinite redirects:

*.76.240.181 - - [29/Oct/2017:14:52:03 +0000] "GET /admin/admin/index/index/key/1efd57644c83b7dddeafcbfa2ae317722fdf09a44a529cbd6c59ae612cce5f8d/ HTTP/1.1" 302 - .76.240. - - [29/Oct/2017:14:52:03 +0000] "GET /admin/admin/index/index/key/2e928a54097b04300bce0396dfefd14f0f6d00f8685facd90396c2a1748e2c31/ HTTP/1.1" 302 - .76.240. - - [29/Oct/2017:14:52:03 +0000] "GET /admin/admin/index/index/key/7f171df1bebc545167632253133055efcb0cf22be8d0d2f25da876da7157b842/ HTTP/1.1" 302 - .76.240. - - [29/Oct/2017:14:52:04 +0000] "GET /admin/admin/index/index/key/0cefdc9644a14e247523f7e022d874db0e8dda2ab60f61ae337c5f6ab2ac267a/ HTTP/1.1" 302 -

delete all cookies for doamin, sure helps


If you have recently enabled HTTPS

magento config:set web/secure/use_in_adminhtml 1

I found this command several pages deep into google and it fixed the admin HTTPS redirect error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.