SEO Tools

Free Hreflang Sitemap Builder

Create XML sitemap entries with xhtml:link hreflang annotations for multilingual websites. Enter language code and URL pairs, optionally add an x-default URL, and get ready-to-use sitemap XML with automatic reciprocity validation.

Loading tool...

What is Hreflang Sitemap Builder?

An hreflang sitemap extends a standard XML sitemap with xhtml:link elements that tell search engines which language or regional version of a page to show to users. While hreflang can be implemented via HTML link tags or HTTP headers, the sitemap approach centralizes all hreflang data in one file, making it easier to audit and maintain across a large multilingual site.

quickAnswer

Build XML sitemap entries with hreflang xhtml:link annotations for multilingual pages. Each URL entry lists all language alternates. Ensure reciprocity: every page must link to every other version in the language group, and the x-default URL provides a fallback for unmatched languages.

limitations

  • Hreflang is a hint, not a directive. Search engines may still show a different language version if they determine it is more relevant to the user's query.
  • Each URL in a sitemap entry must be individually crawlable and indexable. If a page is blocked by robots.txt or has a noindex tag, the hreflang annotation may be ignored.
  • Sitemap-based hreflang requires that every URL listed be valid and return a 200 status code. A single broken URL in the group can cause search engines to ignore the entire hreflang set.

How to use this tool

  1. Enter one language code and URL pair per line using the format: language-code|absolute-url.
  2. Optionally add an x-default URL for a language selector or global landing page.
  3. Enable reciprocity validation to check that every page in a language group links to every other version.
  4. Copy the generated XML and include it in your sitemap or submit it as a separate sitemap-hreflang.xml.

What you can use it for

  • Create a dedicated hreflang sitemap for a multilingual blog with translated posts across 5+ languages.
  • Validate that all language versions in a hreflang group correctly reference each other before a site launch.
  • Add hreflang annotations to an existing sitemap without editing individual page markup.

Use cases

Practical examples

example

Three-language documentation site

A docs site has English, German, and French versions of each page. Enter all three locale/URL pairs for each page group. The tool generates XML entries where each URL lists all three alternate versions plus an x-default fallback.

example

E-commerce site with regional variants

An online store has US English, UK English, and Canadian French versions. Enter the pairs and verify reciprocity — if the UK English page does not list the Canadian French alternate, the tool flags the missing link.

Common mistakes

  • Using relative URLs instead of absolute URLs — hreflang requires fully qualified URLs including the protocol (https://).
  • Forgetting to include the current page URL in its own set of alternates — each URL must list itself in the alternate links.
  • Creating hreflang groups that do not form complete reciprocal sets — if page A links to page B, page B must link back to page A with the matching language code.

verification

  1. Submit the hreflang sitemap to Google Search Console and check the International Targeting report for errors.
  2. Use the hreflang tag testing tool in Google Search Console or a third-party hreflang validator to confirm all alternate links resolve correctly.

FAQ

Questions about Hreflang Sitemap Builder

Do I need both hreflang HTML tags and an hreflang sitemap?

No, one implementation method is sufficient. The sitemap approach is recommended for larger sites because it centralizes hreflang data in one file, making it easier to audit and maintain. HTML link tags in each page's head are simpler for small sites. Using both is redundant but harmless.

What happens if reciprocity validation fails?

If pages in a hreflang group do not form complete reciprocal sets, search engines may ignore the hreflang annotations entirely or only partially honor them. This can cause the wrong language version to appear in search results. Every page must link to every other page in the group, and every link must be reciprocated.

How many URLs can a single hreflang sitemap contain?

The same limits as a standard XML sitemap apply: 50,000 URLs and 50 MiB uncompressed. For very large multilingual sites, split hreflang sitemaps into multiple files and use a sitemap index. Note that hreflang annotations add significant size to each URL entry.

Related tools

More seo tools

Seo

AI Crawler robots.txt Builder

Build a robots.txt policy for AI crawlers. Choose from open, selective, or strict presets and block specific AI training bots while allowing search engines.

Open tool

Seo

llms.txt Validator

Validate llms.txt files against the specification. Check H1 headings, blockquote summaries, section structure, and Markdown link formatting.

Open tool

Also try

Also try

Html

ARIA Live Region Generator

Generate accessible ARIA live region HTML snippets with role, aria-live, aria-atomic, and aria-relevant attributes. Includes optional JavaScript update function.

Open tool

Html

CSP Hash Generator

Generate CSP hash values for inline scripts and styles. Hash exact code content with SHA-256, SHA-384, or SHA-512 and get the matching CSP directive snippet.

Open tool