3

The live URL is http://shop.com. The development/staging URL is http://sub.shop.com. How do I have to set up the cookie domain, so that I can log into both admin areas without any interdependencies? I tried the following cookie domain settings, but none of them worked:

Live cookie domain: .shop.com
Dev cookie domain: .shop.com
Result: Live login does not work.

Live cookie domain: shop.com
Dev cookie domain: .shop.com
Result: Logging out from one admin area means that you are also logged out from the other admin area.

Live cookie domain: shop.com
Dev cookie domain: sub.shop.com
Result: Dev login does not work.

Live cookie domain: .shop.com
Dev cookie domain: sub.shop.com
Result: No login works.

Live cookie domain: shop.com
Dev cookie domain: .sub.shop.com
Result: Dev login does not work.

Live cookie domain: .shop.com
Dev cookie domain: .sub.shop.com
Result: No login works.

Of course, I have disabled the Magento cache and I clear the cookies in my browser before trying each setting.

2

This looks pretty much like the login issue described by Phillip Jackson.

An adminhtml cookie must not be valid for more than one installation. If you can, use separate second-level domains for each of the sites or access the live admin area via subdomain.

1

My preferred setup is this

Live cookie domain: example.com
Dev cookie domain: test.example.com

However, it seems to work best if the live domain is not a "parent" of the dev domain, i.e.

Live cookie domain: www.example.com
Dev cookie domain: test.example.com
  • In my experience, your first setup does not work. You cannot login into live + dev at the same time with it. This works fine if you have your live site under www., but this is not always the case. – Simon Jul 1 '16 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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