Well, with every website I've created, setting the cookie's domain to
.mydomainname.tld worked even if the third level domain changed.
User browses www.mydomain.com
. A session cookie is created.
User then clicks a link that directs them to mydomain.com. The cookie session is still active. They then click on another link that directs them to
forum.mydomain.com, the cookie session still works.
It works because the cookie domain is ".mydomain.com" instead of "www.mydomain.com"