Skip to main content
Premium Tool

Alternate Mapping Generator

Upload your sitemap or URL list and auto-generate a complete alternate-page mapping with reciprocal hreflang annotations for every locale.

Loading tool…

This page explains what the Alternate Mapping Generator does, how it auto-generates alternate page mappings from URL lists, the step-by-step workflow, errors that occur when mappings are auto-detected, and how this generator differs from a general hreflang tag generator.

What is an alternate mapping generator?

An alternate mapping generator is a hreflang tool that automatically discovers the relationships between your localized URLs. Instead of manually pairing each URL with its language counterparts, you paste a flat list of all your international URLs and the tool infers which URLs are alternate versions of the same page based on URL structure patterns.

Most multilingual sites follow a predictable URL convention — /en/about, /es/acerca-de, /de/ueber-uns — where a locale prefix or subdomain identifies the language and the remaining path segments identify the content. The alternate mapping generator parses these patterns, groups URLs that belong to the same page, assigns language codes from the URL structure, and produces the complete hreflang annotation set for every discovered group.

This approach saves significant time when you already have a URL list — from a crawl, a sitemap export, or a CMS dump — but do not have an explicit mapping of which URLs correspond to which. The tool does the grouping for you, then lets you review and correct before generating output in HTML <link>, HTTP Link: header, XML sitemap, or JSON-LD format.

How to use the alternate mapping generator

Follow this auto-discovery workflow:

  1. Paste your URL list. Provide a flat list of all international URLs — one per line. The list can come from a sitemap, a crawl export, a CMS report, or a manual collection. The tool accepts up to 10,000 URLs.
  2. Configure the pattern detector. The tool analyzes your URLs to find the locale indicator. Common patterns include subdirectory (/en/, /es/), subdomain (en.example.com), and query parameter (?lang=en). The tool presents its best guess and lets you confirm or adjust.
  3. Review auto-generated groups. The tool displays the discovered page groups — each group contains the URLs it believes are alternate versions of the same content. Review the groupings for accuracy. You can split groups that were incorrectly merged or merge groups that were incorrectly split.
  4. Verify language codes. For each URL, the tool extracts the language (and optional region) code from the URL structure. Verify that the extracted codes match the actual content. Correct any mismatches — for example, if /cn/ contains Simplified Chinese content, the code should be zh-CN, not cn.
  5. Set x-default and generate. For each group, designate an x-default URL or set a global x-default locale. Then generate the hreflang output. The tool validates reciprocity, self-references, and ISO codes across all groups simultaneously.

Common errors and how to fix them

Auto-detected mappings introduce a distinct category of errors:

  1. Incorrect grouping from ambiguous URL paths. If your English page is /en/services and your Spanish page is /es/servicios, the non-locale path segments differ. The tool uses heuristics (position in URL, known locale codes) to group these correctly, but unusual URL structures may cause false splits. Review every group with more than one URL that has divergent path segments.

  2. Locale codes extracted from non-locale path segments. If your URL is /enterprise/products and the tool's pattern detector reads en from enterprise, it assigns an incorrect language code. Always verify the pattern detector's chosen locale position and adjust if it picked the wrong URL segment.

  3. Missing URLs in the input list. Auto-discovery only works with the URLs you provide. If your flat list is missing the French version of 20 pages, those 20 pages will have incomplete hreflang sets. The tool warns when some groups have fewer locales than others, which may indicate missing URLs.

  4. Mixed URL structures. If part of your site uses subdirectories (/en/) and another part uses subdomains (en.example.com), the pattern detector may fail to unify them into correct groups. The tool lets you define multiple pattern rules — one for each URL structure — and merge the results.

  5. Translated slugs causing false splits. /en/contact-us and /de/kontakt share no path segments beyond the locale prefix. If the tool relies on path matching beyond the locale segment, it may create two separate single-URL groups instead of one two-URL group. The tool provides a manual merge function for these cases and learns from your corrections to improve subsequent groupings.

How this tool is different

The alternate mapping generator automates the most tedious part of hreflang management — figuring out which URLs go together:

For manual URL-to-language pairing without auto-discovery, use the url language mapper. For a general hreflang generator that works one page at a time, use the hreflang tag generator.

Frequently asked questions

  • What is an alternate mapping?
    An alternate mapping is a structured table that pairs every page on your site with its localized counterparts, forming the basis for hreflang annotation generation.
  • Can I upload an existing XML sitemap?
    Yes. The generator parses your sitemap, extracts all URLs, and lets you assign locale relationships by matching URL patterns or manually pairing pages.
  • How does the tool match pages across locales automatically?
    It detects common URL patterns — such as /en/about and /es/about — and groups them as alternate versions of the same page. You can adjust matches manually.
  • What if my URL structure is inconsistent across locales?
    Use the manual pairing mode to drag-and-drop URLs into groups. The generator validates each group and flags any that lack reciprocal links.
  • Does the generator create reciprocal annotations?
    Yes. Every hreflang relationship is reciprocal by default. If page A maps to page B, the generator ensures B maps back to A automatically.
  • What output formats does the generator support?
    HTML link tags, HTTP Link headers, XML sitemap xhtml:link entries, and a downloadable CSV mapping report for record-keeping.
  • How many URLs can the generator handle?
    It processes thousands of URLs in a single session. A background worker handles heavy computation while the interface remains responsive.
  • Can I exclude certain pages from the mapping?
    Yes. Mark pages as excluded in the review table and the generator omits them from the hreflang output while keeping them visible for reference.
  • Does the generator detect orphan pages?
    Yes. Pages that appear in one locale but have no counterpart in any other are flagged as orphans so you can decide whether to add translations or exclude them.
  • Can I save and reload a mapping later?
    Yes. Export your mapping as a JSON snapshot, then reload it in a future session to update URLs or add new locales without starting over.

Related tools