sitemap.download

DOCUMENTATION / PRACTICAL GUIDE

Sitemaps for multilingual websites

Understand language URLs, hreflang and the limits of a simple crawl.

Give each language a distinct URL

A useful starting structure is /en/about and /de/ueber-uns. Language-specific subdomains or domains are other options. Make the versions reachable through ordinary links; a language switcher should not depend only on a cookie or browser preference.

List the public preferred URLs for each language. Avoid sending every translated page to the English version with a canonical tag simply because the topic is the same.

Connect equivalent language versions

hreflang identifies alternate language or regional versions of the same content. Supported implementations include HTML annotations, HTTP headers and XML sitemap extensions. Choose a method you can keep consistent.

For an XML implementation, each language URL has its own entry. Every entry lists the complete equivalent set, including itself, using xhtml:link elements and the XHTML namespace. An optional x-default can identify a fallback or language selector.

A two-language example

This minimal pair repeats both language alternatives for both entries. Replace the URLs with genuinely equivalent pages. The annotation does not translate content.

XML / A two-language example
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://example.com/en/about</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/about"/>
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/ueber-uns"/>
  </url>
  <url>
    <loc>https://example.com/de/ueber-uns</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/about"/>
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/ueber-uns"/>
  </url>
</urlset>

Check your implementation

Check that each linked translation exists, that the equivalent set is complete, and that language codes match the content. Update annotations when URLs change.

sitemap.download can collect linked language paths on the same origin. It does not infer translations or generate hreflang annotations. Separate language subdomains need separate crawls; a CMS or build process is usually better for maintaining the relationships.

Sources and further reading

Reviewed 2 November 2026. Platform behaviour can change; consult the linked documentation for your setup.

Keep learning