E-commerce & international

multilingual sitemap

Also called: multi-language sitemap, hreflang sitemap, hreflang xml sitemap

A multilingual sitemap is an XML sitemap that lists every language and region version of each URL using xhtml:link rel="alternate" hreflang annotations, so search engines can serve users the right localized page. Each entry must reference all variants, including itself.

A multilingual sitemap moves hreflang annotations out of each page’s <head> and into the sitemap file, which keeps pages lighter and puts the whole language map in one place. Google treats it as one of three valid ways to declare localized versions, alongside HTML link tags and HTTP headers.

How the markup works

The file declares the XHTML namespace (xmlns:xhtml="http://www.w3.org/1999/xhtml"). Each page gets one <url> block whose <loc> holds the canonical URL, followed by an <xhtml:link rel="alternate" hreflang="..."> line for every language or region version, including the page itself:

<url>
  <loc>https://example.com/en/product</loc>
  <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/product"/>
  <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/product"/>
  <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/en/product"/>
</url>

Language codes use ISO 639-1 and regions use ISO 3166-1 Alpha 2. A region on its own is not valid, and x-default catches users whose settings match none of your locales. Two rules break most builds. Links must be bidirectional: if the English URL names the German URL, the German URL has to name English back, or Google may ignore the whole set. And every URL must list itself among its alternates. A sitemap also only covers URLs under the directory it is hosted from.

How it affects your traffic

For an international store, this is how Google stops showing a German shopper your English product page (and the wrong currency and shipping), which is a common cause of bounce and lost sales in non-home markets. Broken return links or a missing self-reference make Google drop the annotations, so localized pages compete with each other instead of ranking in their own regions. A clean multilingual sitemap consolidates that signal and helps each storefront rank in its target country. Sorting out hreflang, sitemaps, and international indexing at scale is core to our E-commerce SEO work.

Get E-commerce SEO that moves the needle

We turn terms like this into ranked pages and qualified pipeline. Start with a free Initial SEO Strategy.