Sharing cookies between two URLs, one forum instance.


Active member
I hope this can be easily done and someone is willing to help me.

I have two URLs, both pointing to the same forum instance. I have bought two licenses to accommodate this.

It works fine except that if you go from one to the other you have to log in repeatedly. I would like to not have to do this and cookies go across the board.

(ha, see what I did there? Across the board!)

Is this easily done? Any advice appreciated.


XenForo developer
Staff member
You can't share cookies between 2 entirely unrelated domains (without developing a complex system to support it, that is).

Jake Bunce

XenForo moderator
Staff member
Browser cookies cannot cross between different domain names. You will have to login for each domain name. This is a limitation of cookies and would be a problem no matter what forum software you use.
Like the others said, cookies are set on a per domain basis. You will be unable to set the cookie for from

However, you might be able to come up with something like this:
  • user logs in at Site A
  • site sets their cookie at Site A
  • site redirects user to Site B
  • site sets their cookie at Site B
  • site redirects user back to site A
2 things to think about:
  • You'd probably need to also log out of both sites when the user clicks "logout"
  • Any information that is stored in the cookie after the user logs in could cause inconsistencies between the 2 domains
Unless it's critical, I wouldn't bother with it.


Active member
I guess I was hoping you could pass a session key back and forth rather than rely on a cookie stored on the users local machine.

...this really bums me out. Not critical, but a terrible annoyance as users come to the forum from one site - discover the second as intended - go check it out, then come back with the forum button in the navbar there.