Enabling Cookie Sharing Across Domains
You can share cookies across domains. In order to do this, your domains must have a common second-level domain name. For example, msdn.microsoft.com and premier.microsoft.com can share cookies with the domain property set to .microsoft.com, because .microsoft.com is the name of the second-level domain for msdn.microsoft.com and premier.microsoft.com. You cannot set the domain property to only the top-level domain, for example .com.
For more information about domain levels, see Overview of the DNS Domain Namespace.
To enable cookie sharing across domains
Expand Commerce Server Manager, expand Commerce Sites, and then click the site you want to administer.
Expand Applications, right-click the application you want to configure, and then click Properties.
In the Number of shared domain levels box, specify how many domain levels must be in common in order to share a cookie.
For example, to enable cookie sharing across the premier.microsoft.com and msdn.microsoft.com sub-domains, set this value to 2.
The number 2 in this case is calculated by adding the top-level domain (.com) and the second-level domain (microsoft.com), there are 2 domain levels. Therefore, any sub-domain of the microsoft.com domain, such as msdn.microsoft.com and premier.microsoft.com can share cookies.
Restart IIS. For instructions, see Restarting IIS and Commerce Server Services.
- If you are using encryption to encrypt tickets, verify that the encryption key is the same on both domains. It is recommended that you encrypt cookies because they contain authentication tickets. For information about encrypting cookies, see Summary of Cookie Features. For information about generating a new encryption key, see Generating a New Cookie Encryption Key.