Sitecore Multilingual Sites: How to Configure Sitecore for Multiple Domains

If you have chosen to the multiple domain path to implement your multilingual sites, either on your own or based on my previous post, Single Domain vs. Multiple Domain Implementation, the good news that it’s more configuration than development, with the bulk of it being done inside the web.config.

This was tested on Sitecore v6.1, so please perform ample testing when working with other versions.

Default Web.config Sites Section

<sites>
   <site name="shell" ... />
    <site name="login" ... />
    <site name="testing"... />
    <site name="admin" ... />
    <site name="service" ... />
    <site name="modules_shell" ... />
    <site name="modules_website" ... />
    <site name="website" ... />
    <site name="scheduler" ... />
    <site name="system" ... />
    <site name="publisher" ... />
</sites>

Your new site entry will go above <site name=”website”>. I didn’t think the order mattered, but according to a Sitecore engineer who helped me debug my issues, it does. It’s a bug in v6.1, which may or may not have been fixed in newer versions.

The Modification – <sites>

<site name="website-uk" targetHostName="www.yoursite.co.uk" hostName="www.yoursite.co.uk" language="en-gb" ... />
      <site name="website" targetHostName="www.yoursite.com" hostName="www.yoursite.com" language="en" ... />

You should also clone the entry for cache sizes.

<cacheSizes>
      <sites>
        <website>
          <html>10MB</html>
          <registry>0</registry>
          <viewState>0</viewState>
          <xsl>5MB</xsl>
        </website>
        <website-uk>
          <html>10MB</html>
          <registry>0</registry>
          <viewState>0</viewState>
          <xsl>5MB</xsl>
        </website-uk>
      </sites>
    </cacheSizes>

The <linkManager> manager section also has some modifications. I have changed languageEmbedding to “never,” as it’s not necessary with multiple domains and is also better for SEO not to duplicate your content with multiple access via www.yourdomain.com/mypage.aspx and www.yourdomain.com/en/mypage.aspx going to the same place. I have also changed alwaysIncludeServerUrl to false, as it was causing some incorrect linking in some places.

<add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" shortenUrls="true" useDisplayName="false" />

Finally, I’ve had to set Rendering.SiteResolving to false as it was also causing issues with links on www.mysite.com showing up as www.mysite.co.uk

<setting name="Rendering.SiteResolving" value="false" />

That’s really it. It took many days and a lot of trial-and-error testing, but I’m happy to say my sites are up and working without a hitch. Hopefully, you will find this useful as well. But please remember – test everything.

Sitecore Multilingual Sites: Single Domain vs. Multiple Domain Implementation

Before we get into the implementation, let me start by saying that this is more of a high-level marketing decision than a technical one.   The important thing is from a technical side – it can be done. This post should help determining which option is right for you and your organization.  You may need to involve a marketing person in helping you obtain the answers needed.  If you need mental preparation to deal with your marketing team, go through a Dilbert calendar.

Corporate Identity

Do your global sites have their own identity? If so, multiple domains may be the way to go – especially as far as search engine optimization (SEO) is concerned.  If there are search engine marketing (SEM) campaigns being strategized and/or individual content campaigns being designed for each site, the campaigns may end up easier to manage if you have multiple domains (e.g. mysite.com, mysite.co.uk, mysite.com.fr).

You can also use subdomains, which may be less costly from an SSL certificate perspective, discussed below, but there may be cultural considerations.  If you are going to have a large audience in UK, for example, where the dominant domain suffix is .co.uk, how many will know to access their localized site using uk.mysite.com versus mysite.co.uk? How many subdomains can you name at the top of your head?

SSL

If the multiple-domain setup is the chosen route and you are planning to collect user data such as registration information, credit card, or any other sensitive information that may need to be served via the https protocol, you will need to decide what kind of certificate you will need.  If you are doing subdomains (e.g. france.mysite.com, spain.mysite.com, etc.), you may be able to purchase a wildcard certificate that will work for all sites ending in *.mysite.com.  This may end up less costly in the end than purchasing individual SSL certificates for each domain, but there are the cultural questions to consider from above.

From an IIS perspective, if a subdomain is your ticket, you are able to host the sites from a single IIS instance.  For separate domains, you will need to set up separate IIS sites pointed to the same location.  In addition, if you are hosting the sites from the same IP, you will need to set up SSL bindings using IIS Admin Tools.  The detailed step-by-step commands are outlined in this MSDN article: http://bit.ly/bOtGXB

Multiple Domain Implementation in Sitecore

The good news is Sitecore makes it real easy to implement the multiple-domain scenario.  All that is required are some minor tweaks to the web.config and some optional code to implement depending on how you form your links.  I will go into detail in the a post shortly following this one.

On the other hand, if all you are doing is providing a translated version of your site in multiple languages with minor content differences, the single domain implementation may be better for you, also making the SSL problem easier to solve with just a single certificate.  In addition, no web.config tweaking is necessary.  You are ready to go out of the box.

Developing Multilingual Sites in Sitecore: A Series

I’m working on rolling out a site for my company, developed in Sitecore, across the globe to our international partners.

While the Sitecore documentation outlines the basics, there have been a lot of lessons learned trying to perfect a robust enough codebase to ensure maximum flexibility in features. The basic goal is to allow the maintenance of content for our partners independently without having to touch and recompile the code.

In the posts following, I will talk in detail about gotchas I’ve encountered along the way and will be presenting some code samples as I go along.

Click on the ‘sitecore series’ tag at the bottom of this article to see all related posts