A Quick HREFLANG Primer
When a website publishes equivalent content in multiple languages, search engines need help understanding how those pages relate to one another. The standard solution is hreflang.
Hreflang tells Google which URL should be shown to users based on their language or region. It can also prevent translated pages from competing with one another as if they were unrelated URLs.
The traditional implementation places hreflang annotations in each page’s HTML <head>. This works well for a small number of languages. At scale, however, it can produce bloated HTML and a fragile network of annotations.
The Traditional HTML Hreflang Approach
Suppose a page is available in English, Spanish, French, German, and Japanese.
The English page would contain the following markup:
<head>
<title>Example Travel Guide</title>
<link
rel="alternate"
hreflang="en"
href="https://example.com/travel-guide"
/>
<link
rel="alternate"
hreflang="es"
href="https://example.com/es/guia-de-viaje"
/>
<link
rel="alternate"
hreflang="fr"
href="https://example.com/fr/guide-de-voyage"
/>
<link
rel="alternate"
hreflang="de"
href="https://example.com/de/reisefuehrer"
/>
<link
rel="alternate"
hreflang="ja"
href="https://example.com/ja/travel-guide"
/>
<link
rel="alternate"
hreflang="x-default"
href="https://example.com/travel-guide"
/>
</head>
The same complete set must normally appear on the Spanish, French, German, and Japanese versions. Each language page must reference itself and the other equivalent pages.
The pages also need reciprocal annotations. If the English page identifies a Spanish alternate, the Spanish page must identify the English version in return.
What Does x-default Mean?
The reserved x-default value identifies the fallback URL for users whose language or region does not match one of the specified versions.
It can point to:
- The website’s primary-language page
- A language-selection page
- A locale-selection page
- Another appropriate fallback experience
x-default is recommended when a meaningful fallback exists, but it is not required for every implementation.
When HTML Hreflang Becomes a Problem
HTML hreflang is valid and fully supported by Google. The problem is not the method’s SEO effectiveness, it is its scalability.
Every Page Repeats the Same Information
A five-language page group requires five HTML pages, each containing the same set of alternate links.
As the number of languages grows, the number of relationships grows rapidly:

This is effectively an N × N relationship: every indexable language URL must be connected to every other URL in its group.
Larger HTML Responses
Although hreflang tags are invisible to visitors, they are still delivered in the HTML response.
A website with dozens of languages can add thousands of characters to the <head> of every translated page. That markup must be generated, transferred, parsed, and maintained on every request.
Increased Risk of Inconsistency
Large HTML implementations are vulnerable to:
- Missing return links
- Incorrect language codes
- Redirecting alternate URLs
- Noncanonical URLs
- References to deleted translations
- Inconsistent sets between language versions
- Templates accidentally applying the wrong URL path
A single page template error can affect thousands of URLs.
Difficult Troubleshooting
When hreflang is embedded in page templates, diagnosing an issue may require inspecting numerous rendered pages across numerous languages.
The implementation becomes especially difficult when translations are created, removed, or updated independently.
Solving the Problem with Hreflang XML Sitemaps
Google supports three hreflang implementation methods:
- HTML <link> elements
- HTTP Link headers
- XML sitemaps
Google considers these methods equivalent. There is no ranking benefit to maintaining the same annotations through multiple methods.
For a large multilingual website, an XML sitemap centralizes the relationships in one system and removes the annotation block from each page’s HTML.
Important Structural Rule
An hreflang sitemap must contain one <url> entry for every indexable language URL.
Each entry must include:
- The page URL in <loc>
- An alternate for the URL itself
- The equivalent URLs in the other supported languages
- An optional x-default alternate
It is not sufficient to create one <url> entry for the entire translated-page group.
Complete Hreflang Sitemap Example
The following page is available in English, Spanish, and French:
https://example.com/travel-guide
https://example.com/es/guia-de-viaje
https://example.com/fr/guide-de-voyage
The sitemap requires three <url> entries. Each one contains the same alternate set.
<?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/travel-guide</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="https://example.com/travel-guide" />
<xhtml:link
rel="alternate"
hreflang="es"
href="https://example.com/es/guia-de-viaje" />
<xhtml:link
rel="alternate"
hreflang="fr"
href="https://example.com/fr/guide-de-voyage" />
<xhtml:link
rel="alternate"
hreflang="x-default"
href="https://example.com/travel-guide" />
</url>
<url>
<loc>https://example.com/es/guia-de-viaje</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="https://example.com/travel-guide" />
<xhtml:link
rel="alternate"
hreflang="es"
href="https://example.com/es/guia-de-viaje" />
<xhtml:link
rel="alternate"
hreflang="fr"
href="https://example.com/fr/guide-de-voyage" />
<xhtml:link
rel="alternate"
hreflang="x-default"
href="https://example.com/travel-guide" />
</url>
<url>
<loc>https://example.com/fr/guide-de-voyage</loc>
<xhtml:link
rel="alternate"
hreflang="en"
href="https://example.com/travel-guide" />
<xhtml:link
rel="alternate"
hreflang="es"
href="https://example.com/es/guia-de-viaje" />
<xhtml:link
rel="alternate"
hreflang="fr"
href="https://example.com/fr/guide-de-voyage" />
<xhtml:link
rel="alternate"
hreflang="x-default"
href="https://example.com/travel-guide" />
</url>
</urlset>
Connecting the Hreflang Sitemap
A dedicated file might live at:
https://example.com/sitemap-hreflang-001.xml
It can be referenced from a sitemap index alongside the site’s existing sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-hreflang-001.xml</loc>
</sitemap>
</sitemapindex>
The sitemap index can then be declared in robots.txt:
Sitemap: https://example.com/sitemap-index.xml
It should also be submitted through Google Search Console.
XML Sitemaps Centralize the Complexity
An XML sitemap does not eliminate hreflang’s underlying N × N relationship. Every language URL still needs to be mapped to its equivalents.
What it eliminates is the need to deliver and maintain those annotations inside every page’s HTML.
This provides several practical advantages:
- Smaller and cleaner HTML responses
- One centralized source of hreflang data
- Easier automated generation
- Easier validation and troubleshooting
- Less dependence on page templates
- Cleaner handling of additions and removals
- No need to synchronize HTML across every locale
For large websites, the sitemap should be generated from the CMS or translation database rather than maintained manually.
Sitemap Size Limits
A single sitemap is limited to:
- 50,000 <url> entries
- 50 MB uncompressed
The <xhtml:link> alternate elements do not count toward the 50,000-URL limit, but they do count toward the file-size limit.
Large implementations should therefore use numbered files:
https://example.com/sitemap-hreflang-001.xml
https://example.com/sitemap-hreflang-002.xml
https://example.com/sitemap-hreflang-003.xml
Each file can then be included in the sitemap index.
Requirements That Still Apply
Moving hreflang into XML does not relax the underlying technical requirements.
Every included language URL should:
- Return a 200 response
- Be indexable
- Contain an actual translated equivalent
- Have a self-referencing canonical
- Use a fully qualified HTTPS URL
- Use a supported language or language-region code
- Avoid redirecting to another language
- Be referenced reciprocally by its alternate pages
Translated pages should not canonicalize to the primary-language page. Doing so sends conflicting signals: the canonical says the translated URL is not the preferred page, while hreflang says it is a valid localized alternate.
Do Not Index Languages Merely Because They Exist
A translation feature may be capable of generating dozens of language versions, but that does not mean every version should become an indexable SEO page.
Before including a language in the hreflang sitemap, confirm that:
- There is meaningful audience or search demand
- The translation is accurate and useful
- Proper names, measurements, dates, and local details are preserved
- Navigation and conversion paths work in that language
- The content can be maintained over time
- The page provides value beyond creating another search URL
Hreflang helps Google select among localized pages. It does not make low-quality translations valuable or guarantee that they will be indexed.
Final Recommendation
For websites with a small number of languages, HTML hreflang remains a reasonable solution.
For websites with dozens of languages, XML sitemap hreflang is generally easier to scale and maintain. It keeps large annotation blocks out of the HTML, centralizes page relationships, and makes automated validation more practical.
The best implementation is not simply the one with the most language URLs. It is the one that accurately maps quality-controlled, indexable translations through a system that can remain correct as the website changes.
Google provides complete implementation requirements in its localized versions documentation and sitemap guidance.
Want To Level Up Your Travel Marketing?
Subscribe to the NavLog, our bi-weekly travel marketing roundup, where you’ll be the first to know about breaking news that impacts travel marketers and access exclusive performance marketing strategies and practical tips you can implement from the marketers at the leading edge of the travel industry.






