Hreflang XML Sitemap: 3 Examples You Can Steal

hreflang sitemap example

In order to tell Google and other search engines which language/country version is intended for which audience, you can use a Hreflang sitemap.

A Hreflang sitemap indicate how the language/country versions are related. Each URL that has an equivalent in another language/country should be specified in a separate row of the sitemap. You need to add the URL itself with all its equivalents.

Below are some examples of how a Hreflang sitemap could look like for subdirectories, ccTLDs and subdomains.

Subdirectories

Versions:

  • example.com (English)
  • example.com/de (German)
  • example.com/fr (French)
<?xml version=”1.0″ encoding=”UTF-8″?><urlset xmlns=”https://www.sitemaps.org/schemas/sitemap/0.9″ xmlns:xhtml=”https://www.w3.org/1999/xhtml”><url><loc>https://example.com</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.com/de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.com/fr”/></url><url><loc>https://example.com/de</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.com/de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.com/fr”/></url><url><loc>https://example.com/fr</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.com/de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.com/fr”/></url></urlset>

Subdomains

Versions:

  • example.com (English)
  • de.example.com (German)
  • fr.example.com (French)
<?xml version=”1.0″ encoding=”UTF-8″?><urlset xmlns=”https://www.sitemaps.org/schemas/sitemap/0.9″ xmlns:xhtml=”https://www.w3.org/1999/xhtml”><url><loc>https://example.com</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://de.example.com”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://fr.example.com”/></url><url><loc>https://de.example.com</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://de.example.com”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://fr.example.com”/></url><url><loc>https://fr.example.com</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://de.example.com”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://fr.example.com”/></url></urlset>

ccTLDs

Versions:

  • example.com (English)
  • example.de (German)
  • example.fr (French)
<?xml version=”1.0″ encoding=”UTF-8″?><urlset xmlns=”https://www.sitemaps.org/schemas/sitemap/0.9″ xmlns:xhtml=”https://www.w3.org/1999/xhtml”><url><loc>https://example.com</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.fr”/></url><url><loc>https://example.de</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.fr”/></url><url><loc>https://example.fr</loc><xhtml:link rel=”alternate” hreflang=”en” href=”https://example.com”/><xhtml:link rel=”alternate” hreflang=”de” href=”https://example.de”/><xhtml:link rel=”alternate” hreflang=”fr” href=”https://example.fr”/></url></urlset>

Hreflang Sitemap Generators

You can also use dedicated XML sitemap generators to create a Hreflang sitemap.

  • Bio
  • Latest Posts
Martin Kura on TwitterMartin Kura on LinkedInMartin Kura on Goolge+

Martin Kůra

Martin a.k.a. @HermanTinkura helps international and local companies enter new markets by creating a vast multi-cultural SEO strategy. Martin writes for SEMrush and likes to explore different cultures of the world, which is his favorite part of his work.

Share This