Docs

Issue guide · International

Same hreflang code points to two URLs

SeverityMedium
CategoryInternational
ScopeWhole site
EffortSmall
Verified byRe-crawl after you mark the task done
Rule keyhreflang_duplicate_lang

Short answer

In this page's hreflang set, the same language-region code (for example en-GB) is listed with two or more different URLs. Google cannot tell which one is the version for that audience and may ignore those entries. Each code may appear once in a set: keep one URL per code, and give a separate code to each real variant.

Why it matters

hreflang works as a lookup table: one audience, one URL. Duplicate codes usually come from two plugins or two methods (HTML and sitemap) generating annotations independently, or from a regional page and a language page both claiming the same code. The result is that the wrong page, or none, is shown to users in that market.

How Glimana detects it

For every page that returns 200 and carries hreflang, Glimana groups the annotations by code (case-insensitive) and compares the target URLs. The rule fires when one code has two or more different targets. The evidence lists up to five such codes with their URLs.

How to fix it

  1. Find the affected pages in Glimana. Open Issues › Same hreflang code points to two URLs. Every affected page is a row; open one to see the evidence Glimana recorded for it (the measured value, the offending element or the target URL). The same list sits on the task card under Tasks, and the page's own detail view under Pages shows its full signals.
  2. Apply the fix on your platform.

    Decide which URL is the version for that code and remove the other entry. If both are needed, they serve different audiences: give each its own code (en-GB and en-IE, or en and en-US). Make the same change on every page of the set so the sets stay identical.

    Check that only one plugin outputs hreflang (WPML, Polylang or the SEO plugin — not two). In WPML, two languages configured with the same hreflang code produce this error: open WPML → Languages → Edit languages and give each language a unique code.

    Two markets that share a language and region produce the same code. Review Settings → Markets: each market should cover distinct countries. Remove any custom hreflang block in theme.liquid that duplicates what Markets already prints.

    Build the set from a map keyed by code, so a second URL for the same code is a build error rather than a second tag. If you also publish hreflang in the sitemap, generate both from the same map.

  3. Publish and clear caches. Save and publish, then make sure the crawler will see the new version: WordPress — clear the page cache in your cache plugin and purge the CDN; Shopify — theme and content changes go live on save, but purge any CDN in front of the store; custom code — deploy and purge the edge cache. Check in a private window or with curl -s https://your-domain/page | grep -i '<title\|canonical\|robots' that the live HTML has changed; Glimana reads what the server sends, not what your browser has cached.

  4. Verify in Glimana. Open the task under Tasks and click Mark as done. The affected pages are queued for a verification crawl within a few hours, and the task closes when no hreflang code on the page points to two URLs. If the check still fails, the task returns to New with a note; when it passes, the task is listed under Resolved technical issues on Impact reports. To check sooner, use Re-crawl affected pages on the issue.

How the fix is verified

The next crawl re-reads the hreflang sets; the task closes when every code points to a single URL.

Sources

Was this page helpful?

Last updated 2026-10-27 · Contact support