Free sitemap generator

Gerador de sitemap Hreflang

Create an XML sitemap with hreflang alternates for every language, or a Next.js sitemap.js, in seconds. Build it from your URL pattern or import the tags from live pages.

Your site

12 URLs across 3 pages

<?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/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
  <url>
    <loc>https://example.com/fr/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
  <url>
    <loc>https://example.com/de/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
  <url>
    <loc>https://example.com/es/</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/pricing" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />
  </url>
  <url>
    <loc>https://example.com/fr/pricing</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/pricing" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />
  </url>
  <url>
    <loc>https://example.com/de/pricing</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/pricing" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />
  </url>
  <url>
    <loc>https://example.com/es/pricing</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/pricing" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/pricing" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/pricing" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/pricing" />
  </url>
  <url>
    <loc>https://example.com/blog/hello-world</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/blog/hello-world" />
  </url>
  <url>
    <loc>https://example.com/fr/blog/hello-world</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/blog/hello-world" />
  </url>
  <url>
    <loc>https://example.com/de/blog/hello-world</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/blog/hello-world" />
  </url>
  <url>
    <loc>https://example.com/es/blog/hello-world</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/blog/hello-world" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/blog/hello-world" />
  </url>
</urlset>

/ Altified

Keep your multilingual sitemap in sync automatically

Altified publishes a translated sitemap that updates whenever you add pages or languages.

Comece gratuitamente

How to generate a hreflang sitemap

Enter your site URL, the hreflang codes you publish, and how your language URLs are structured. Add page paths, one per line, and the tool builds every language URL with reciprocal alternates.

  • Choose subdirectories, subdomains, or a language query parameter.
  • Keep the default language at the root or give it its own prefix.
  • Download sitemap.xml, or copy the Next.js app/sitemap.js version.

Hreflang sitemap example

Every url element contains a loc plus one xhtml:link for each language version, including itself and an optional x-default. The urlset must declare the xhtml namespace, which the generator adds for you.

/ PERGUNTAS FREQUENTES

Perguntas frequentes

What is a hreflang sitemap?

It is an XML sitemap where each URL lists its language alternates with xhtml:link elements. It is an alternative to placing hreflang tags in each page's HTML head, and is useful for large sites or pages you cannot easily edit.

Do I need hreflang in both the sitemap and the HTML?

No. One method is enough. If you use both, the two sets must match exactly, otherwise search engines receive conflicting signals.

Why does every language URL get its own entry?

Each language version must list itself and every other version. So a page in four languages produces four url entries, each with the same complete set of alternates.

How do I add hreflang alternates to a Next.js sitemap?

In the App Router, return alternates.languages from app/sitemap.js, as the Next.js tab shows. Next.js renders those entries as xhtml:link elements in the generated sitemap.xml.

What does Import from live pages do?

It reads the hreflang tags already present on up to 10 public pages and turns them into sitemap entries, so you can move an existing hreflang setup into a sitemap without retyping it.

Where do I submit the sitemap?

Upload it to your site root, reference it in robots.txt with a Sitemap: line, and submit it in Google Search Console and Bing Webmaster Tools.