Foundation SitemapXml Supports Multi-Language

The Constellation.Foundation.SitemapXml library will now emit a multi-language sitemap.xml file according to Google’s spec on alternate language URLs in the sitemap.xml file.

To activate this feature, you need to tell the sitemap.xml generator which languages your site supports. You do this by configuring the desired <site/> element in your Sitecore config files.

  • Ensure you specify a “defaultLanguage” attribute with a proper ISO language code that matches the Language Item in Sitecore.
  • Add a new custom “supportedLanguages” attribute to your <site/> config element. The value of this attribute should be a comma-delimited list of ISO language codes, again, matching your Languages as defined within Sitecore.


<site name=”headquarters” defaultLanguage=”en-US” supportedLanguages=”en-US,fr-CA,es-MX” … />
<site name=”contuso” defaultLanguage=”en” supportedLanguages=”en,da,de,es,fr,it,nl” … />

You can use the two-digit codes or the two-digit + country codes depending upon your Sitecore implementation’s support for regional dialects, but the language codes must match the Language definition Items you have installed in Sitecore.

We also strongly suggest that you enforce the inclusion of Language codes in all URLs for sites that require a multi-language sitemap.xml document, otherwise the URLs produced by link manager may be ambiguous. This will confuse the Google crawlers and have a negative impact on SEO.

Grab the Nuget package

NuGet package for Sitecore 10.1

NuGet package for Sitecore 10.2

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.