I have a multisite configuration running SC8.2u2. All sites have a common domain name xxx.com, however the SC_ANALYTICS_GLOBAL_COOKIE domain name on sub-sites is set to the sub-domain accounts.xxx.com and legal.xxx.com so the global cookie does not match for users when they traverse to a different sub-site.

How is the domain name set for a given sub-site and is there a way to control it? And can I force all sites to use a common wildcard .xxx.com?

2 Answers 2


You'll want to set a <httpCookies> configuration in your Web.config that allows for a wildcard domain. This is done by specifying the root of your domain in the cookie.

Note: that by changing this cookie, this will require people to log back into Sitecore and may need cookies to be cleared in order to take effect. Test heavily to ensure it works for all of your use cases.

    <httpCookies domain=".xxx.com" />
  • Will this work also for the "main" domain www.xxx.com?
    – Snapper
    Jan 10, 2019 at 4:13
  • Yes, this will work for all *.xxx.com domains. Jan 10, 2019 at 6:23
  • What should you put if some of the sites have different TLDs?
    – Calum
    Apr 2, 2019 at 14:12

You should add the following setting in Sitecore.Analytics.Tracking.config just below the <settings> section:

<setting name="Analytics.CookieDomain" value=".xxx.com">

  • 1
    Add more details to your answer like description why this solves the problem and why answer from February that was already accepted is not good from your point of view. Otherwise please delete this answer and make it as a comment Jul 12, 2018 at 6:37
  • this solution will add cookie domain ONLY for the "SC_ANALYTICS_GLOBAL_COOKIE" cookie for all your domain and sub domains! where as adding the httpcookie domain value at the web.config will get affect or it forces all your cookies to point to the main domain.
    – Ajju
    Jul 12, 2018 at 9:35

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.