Hreflang for AI Search: International Visibility in the Age of Generative Engines

If you sell to customers in multiple countries or languages, hreflang implementation determines whether AI search engines serve them the right version of your content — or whether they default to your English pages regardless of the user's language and location.

The traditional toolkit of international SEO — hreflang annotations, canonical tags, and location-based detection — was designed for classic search architectures. In 2026, these signals no longer operate as hard constraints within AI-driven systems. Testing across ChatGPT Search, Perplexity, Gemini, and Claude reveals a recurring pattern: localized URLs are frequently omitted even when the user query is issued in a specific language. The signals that once enforced geographic precision are now interpreted as soft preferences or bypassed entirely during semantic retrieval and generation.

This is a problem for any ecommerce store with international operations. If a German customer asks Perplexity about your product in German, and Perplexity cites your English page instead of your German page, the customer gets a degraded experience — or worse, no useful result at all. Correct hreflang implementation does not guarantee that AI engines will serve the right version, but incorrect or missing implementation guarantees they will not.

How Hreflang Works

Hreflang is an HTML annotation that tells search engines which language and regional versions of a page exist. It uses ISO 639-1 language codes and optionally ISO 3166-1 Alpha 2 country codes to identify each version.

The basic syntax:

<head>
  <link rel="alternate" hreflang="en" href="https://yourstore.com/products/tshirt" />
  <link rel="alternate" hreflang="de" href="https://yourstore.com/de/products/tshirt" />
  <link rel="alternate" hreflang="fr" href="https://yourstore.com/fr/products/tshirt" />
  <link rel="alternate" hreflang="es" href="https://yourstore.com/es/products/tshirt" />
  <link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/tshirt" />
</head>

Each hreflang tag declares a language (and optionally a region) and the URL that serves content in that language. The x-default value specifies the fallback URL for users whose language does not match any of the declared versions.

Language vs. Language-Region Codes

Hreflang supports both language-only and language-region combinations:

  • hreflang="en" — English, any region
  • hreflang="en-US" — English, United States
  • hreflang="en-GB" — English, United Kingdom
  • hreflang="pt-BR" — Portuguese, Brazil
  • hreflang="pt-PT" — Portuguese, Portugal

Use language-region codes when you have distinct content for different regions that share a language. A US store and a UK store with different pricing, shipping information, and product availability should use en-US and en-GB. If your English content is identical regardless of region, use en alone.

Implementation Patterns

Hreflang can be implemented in three ways. Each has tradeoffs for AI search.

HTML Head Implementation

Place hreflang link elements in the <head> of each page. This is the most common implementation for ecommerce sites and the one most reliably processed by AI crawlers:

<link rel="alternate" hreflang="en-US" href="https://yourstore.com/products/tshirt" />
<link rel="alternate" hreflang="de-DE" href="https://yourstore.de/products/tshirt" />
<link rel="alternate" hreflang="fr-FR" href="https://yourstore.fr/products/tshirt" />
<link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/tshirt" />

Every page must include hreflang tags for all its language versions, including itself. This self-referencing requirement is critical — a page that references other languages but not itself creates an incomplete signal.

HTTP Header Implementation

For non-HTML resources (PDFs, images) or when you cannot modify the HTML head, implement hreflang via HTTP headers:

Link: <https://yourstore.com/products/tshirt>; rel="alternate"; hreflang="en-US",
      <https://yourstore.de/products/tshirt>; rel="alternate"; hreflang="de-DE",
      <https://yourstore.fr/products/tshirt>; rel="alternate"; hreflang="fr-FR"

HTTP headers are processed before the HTML body, which means AI crawlers see them even if they timeout during HTML parsing. This makes headers a more resilient implementation for sites with performance concerns.

XML Sitemap Implementation

Add hreflang annotations to your XML sitemap using the xhtml:link element:

<url>
  <loc>https://yourstore.com/products/tshirt</loc>
  <xhtml:link rel="alternate" hreflang="en-US"
    href="https://yourstore.com/products/tshirt" />
  <xhtml:link rel="alternate" hreflang="de-DE"
    href="https://yourstore.de/products/tshirt" />
  <xhtml:link rel="alternate" hreflang="fr-FR"
    href="https://yourstore.fr/products/tshirt" />
  <xhtml:link rel="alternate" hreflang="x-default"
    href="https://yourstore.com/products/tshirt" />
</url>

Sitemap-based hreflang scales well for large catalogs and is easier to maintain programmatically. However, it requires the AI crawler to process your sitemap before visiting your pages — which may not always happen.

For maximum reliability, implement hreflang in both the HTML head and the sitemap. The redundancy ensures that AI systems encounter the signal regardless of how they discover your pages.

How AI Search Engines Handle Hreflang

The behavior of AI search engines toward hreflang signals differs significantly from traditional search engines.

Google AI Overviews

Google has stated as recently as May 2025 that hreflang signals are treated as hints, not directives. Even when hreflang annotations are correctly implemented, canonical tags, site structure, content similarity, and which pages are indexed can influence which version Google surfaces. In AI Overviews, this hint-based treatment means Google may cite your English page in an AI-generated answer for a German query if it determines the English page has stronger authority signals.

Testing reveals that ChatGPT Search frequently omits localized URLs even when the query is in a non-English language. The retrieval system appears to prioritize content authority and topical relevance over language matching. A well-optimized English page about your product may be cited in response to a French query if the French version is less authoritative or less well-structured.

Perplexity

Perplexity shows variable behavior depending on the language. For major European languages, Perplexity often surfaces localized content when available. For less common languages, it defaults to English. The system appears to use language as a ranking signal but not as a hard filter.

Claude

Claude's search functionality tends to prefer content in the query language when high-quality localized versions exist. However, like other AI systems, it will fall back to English content when the localized version lacks depth or authority.

The x-default Tag

The x-default hreflang value specifies the fallback URL for users whose language or region does not match any of your declared versions. This is particularly important for AI search because AI engines serve users globally, and many queries come from language-region combinations you may not explicitly target.

<link rel="alternate" hreflang="x-default" href="https://yourstore.com/products/tshirt" />

Typically, x-default points to either your English-language version or a language-selection page. For ecommerce sites, pointing x-default to your primary market's version is more effective than a language selector — AI crawlers that encounter a language selector may not be able to navigate past it to reach actual content.

Common Hreflang Errors

A study by Ahrefs found that 67% of websites have issues with their hreflang implementation. A Search Engine Land analysis found that 31% of international sites contain conflicting hreflang directives, and 16% are missing self-referencing tags. These error rates mean that correct implementation is a competitive advantage — most of your competitors are getting it wrong.

Every hreflang relationship must be bidirectional. If your English page declares a German alternate, the German page must also declare the English alternate. Missing return links are the most frequent cause of hreflang failure:

<!-- English page: CORRECT - references German version -->
<link rel="alternate" hreflang="de" href="https://yourstore.de/products/tshirt" />

<!-- German page: REQUIRED - must reference English version back -->
<link rel="alternate" hreflang="en" href="https://yourstore.com/products/tshirt" />

When return links are missing, search engines and AI systems may discard the entire hreflang signal set for that page. A single missing return link can invalidate hreflang across all language versions.

Incorrect ISO Codes

Using wrong ISO codes invalidates the signal entirely. The most common mistakes:

  • en-UK instead of en-GB — The ISO code for the United Kingdom is GB, not UK
  • zh without region for Chinese — Chinese has significant regional variants. Use zh-Hans (Simplified) or zh-Hant (Traditional), or region-specific codes like zh-CN or zh-TW
  • jp instead of ja — The language code for Japanese is ja, not jp (which is the country code)
  • br instead of pt-BR — Brazilian Portuguese uses pt-BR, not br

Canonical Conflicts

Hreflang and canonical tags must not conflict. Each language version should self-canonicalize. A German page that canonicalizes to the English page tells search engines the German page is a duplicate of the English page — which contradicts the hreflang signal declaring them as separate language versions:

<!-- German page: WRONG -->
<link rel="canonical" href="https://yourstore.com/products/tshirt" />
<link rel="alternate" hreflang="de" href="https://yourstore.de/products/tshirt" />

<!-- German page: CORRECT -->
<link rel="canonical" href="https://yourstore.de/products/tshirt" />
<link rel="alternate" hreflang="de" href="https://yourstore.de/products/tshirt" />

Non-200 Status Targets

Every URL referenced in a hreflang annotation must return a 200 HTTP status. URLs that return 301, 404, or other non-200 codes invalidate the signal. This is particularly common during site migrations when URLs change but hreflang annotations are not updated.

Optimizing Localized Content for AI Citation

Correct hreflang implementation is necessary but not sufficient for international AI visibility. The localized content itself must be optimized:

Translate, do not just localize. AI engines evaluate content quality in each language independently. Machine-translated content that reads unnaturally will rank lower than competitor content written natively in that language. At minimum, have a native speaker review and refine machine translations.

Maintain content parity. If your English product page has 800 words of description, reviews, and FAQ content, but your German version has only a 100-word translated description, the German version lacks the depth needed for AI citation. Strive for content parity across language versions.

Localize structured data. Product schema, FAQ schema, and other structured data should be translated and localized. Prices should reflect local currency. Review content should include reviews in the local language when available.

Use local entities and references. AI engines evaluate topical relevance in language-specific contexts. A German-language page about running shoes that references German running events, German shoe retailers, and German sizing conventions signals deeper relevance than a translated page that still references American events and US sizing.

Hreflang implementation for AI search is an evolving challenge. The signals that traditional search engines treat as directives, AI engines treat as hints. The best defense is combining correct technical implementation with genuinely high-quality localized content that gives AI engines a strong reason to prefer the localized version over the English default.