I have a problem with my subdomain in Magento 2.1.6.

The user session is not kept between websites.

My websites are like this:

  • sub1.market.com
  • sub2.market.com
  • www.market.com

I set the cookie subdomain like this: .market.com

But the session is not kept, I tried to log in www.market.com and when I go to sub1.market.com I am not connected.

I already cleared the cache, flushed the cache, and reindexed. I also cleared the browser cookies. I tried market.com as cookie and / as cookie path and nothing worked.

I need to do this it's a major task, but i'm out of idea. If someone can helpme!

  • Magento 2.1.6
  • Dev on localhost using wamp
  • Php 7
  • change localhost with custom link (www.market.com)

In a previous install it was working, but with this install it don't want to work.

EDIT : I already searched, but every problems is about the multi websites without using www. so cookie domain is not kept. In my case I set a www. domain and try every cookie domain.

EDIT 2 22.06.2017 My cookie pathis empty and my cookie domain is market-eurecia.com But when I go to the cookie with chrome, the path is / and the domain is .market.com

  • Is the cookie set in the browser when you log in for the correct domain (i.e. .market.com)?
    – nikola99
    Commented Jun 21, 2017 at 21:29
  • When I go to chrome://settings/cookies there is 4 cookie on market.com PHPSESSID, admin, admin, formkey. The PHPSESSID have path: /, domain : .market.com. Also there is noSID in url i have only the sub1.market.com. Commented Jun 22, 2017 at 7:23

1 Answer 1


I find it !

It was the ... Store - Config - Customer Account sharing from Websites to Global ^_^

I forget there was this option ..

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.