MODX 2.8.4. Multilingual Site with two domains, share Cookies?


I plan a website with two languages and use for each language a own domain.
for example: for german for english

This is cool, but the problem is, the login state and GDPR is lost if switch to other language.

Is there a way to share cookies for two domains?

Thank you in advance.


Sharing cookies across different top level domains is tricky and not something MODX supports. Making that work, would involve some sort of redirect process that fetches cookies on one domain to set them again on the other.

Will your users often be active on both sites, and is sharing cookies/sessions a requirement? Then the most straightforward approach would be to use subdomains (, and setting the session_cookie_domain to

You can also consider automatically redirecting users based on browser language settings before they are prompted to accept cookies.

Perhaps an extra could be developed that does a cookie sync across domains, but there are none in existence that I know of.