How to Audit hreflang URLs Without Language-Targeting Conflicts

Learn how to audit hreflang URLs for reciprocity, valid language codes, redirects, missing translations, and canonical conflicts.

Published
Reading time
7 min read
How to Audit hreflang URLs Without Language-Targeting Conflicts
On this page

An hreflang audit checks whether localized pages identify one another accurately and whether each advertised URL leads to the intended page. Use this checklist to find conflicting language targets, broken alternates, and canonicalization issues without assuming that hreflang controls which result Google shows.

Key Takeaways

  • Build one alternate set per equivalent page, not one set for the entire site.
  • Check language and region codes, self-references, and reciprocal links across the set.
  • Visit each alternate and check its final URL, content, indexability, and canonical signals.
  • Hreflang identifies localized alternatives; canonicalization addresses duplicate or preferred URLs. Neither guarantees a particular search result.
  • Leave a missing translation out of the set rather than labeling unrelated content as that translation.

1. Build an inventory of equivalent pages

For each important page, record its intended language and region, the URL advertised in hreflang, and the URLs of its equivalents. Include pages linked across domains if they are part of the same localized set.

A simple inventory might look like this:

Intended audienceHreflangAdvertised URLExpected content
English, any regionenhttps://example.com/en/product/English product page
English, United Kingdomen-GBhttps://example.com/en-gb/product/UK English product page
French, any regionfrhttps://example.com/fr/produit/French product page

These are fictional URLs. Replace them with pages from the site you are auditing.

Group pages by their actual purpose and content. A translated product page should normally point to the corresponding product page, not to the localized homepage or a different product. A region-specific page can still be an equivalent when its currency, availability, or other regional details differ appropriately.

Advertisement

2. Check codes, self-references, and reciprocity

For every group, check the following:

  • Language first: Use a supported language code, optionally followed by a region code. For example, en targets English broadly, while en-GB targets English for the United Kingdom. GB is a region code, not a standalone language target.
  • Correct region: Use en-GB, not en-UK, for UK English. Check other region codes against the supported format rather than assuming a familiar abbreviation is valid.
  • One target per audience: Within a set, do not assign the same hreflang value to two different URLs. Investigate whether a broad language target and a regional target are both intentional.
  • Self-reference: Each localized page should include an entry for its own language or language-region and URL.
  • Reciprocity: Each alternate should link back to the other members of its set. Google may ignore annotations that do not have return links.
  • Consistent set: Aim to publish the same complete set on each member. If a rollout is incomplete, check which reciprocal pairs are already present rather than assuming the entire set is effective.

For example, the HTML head of each of the three fictional pages above could contain the same set:

<link rel="alternate" hreflang="en" href="https://example.com/en/product/">
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/product/">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/produit/">
<link rel="alternate" hreflang="x-default" href="https://example.com/en/product/">

Here, the English page is the fallback for users who do not match a specified language or region. Use x-default only for a suitable fallback; it is not a language code or a substitute for missing translations. A language selector can be a fallback instead if that is appropriate for the site. If it is a separate URL, include it consistently in the alternate set and check its annotations too.

Hreflang can also be supplied through HTTP headers or XML sitemaps. Identify every method in use and look for disagreements between them. Maintaining a single consistent source of annotations can make an audit easier.

3. Verify where each alternate actually goes

For every advertised URL, make a request and inspect the final page. The following command is a starting point for an authorized audit; substitute a URL from your inventory:

curl -sS -L --max-redirs 5 --connect-timeout 10 --max-time 30 \
  -D - -o /dev/null \
  -w '\nFinal URL: %{url_effective}\nFinal status: %{http_code}\n' \
  'https://example.com/en-gb/product/'

The headers show redirect responses as well as the final response. The final URL and status help identify redirects, errors, and unexpected destinations. The example domain and paths are illustrative; the command has not been executed for this article.

For each URL, record:

  1. Response and destination: Does it return a successful page, or does it redirect, return an error, or lead to a soft 404 such as a generic not-found page with a success status? Update annotations that unnecessarily point through redirects to the intended final URL.
  2. Localized content: Is the final page the correct language, region, and equivalent product or article? Check more than the navigation: titles, main content, currency, and availability may reveal a mismatch.
  3. Indexability: Check applicable robots meta tags and X-Robots-Tag headers for noindex, and review robots.txt and authentication restrictions that might prevent crawling or indexing. A successful HTTP response alone does not establish indexability.
  4. Canonical signals: Inspect the canonical link and any HTTP Link header, as well as redirects and sitemap signals. A canonical pointing to another language or to an unrelated page deserves investigation.
  5. Annotations on the destination: Check its return links, including its self-reference. Inspect the delivered HTML head, relevant HTTP headers, and sitemap where applicable; if markup is generated with JavaScript, also inspect the rendered page.

Repeat checks from a suitable location or with appropriate site settings if localization varies by geography, cookies, or authentication. Do not assume that a browser session and a search crawler receive identical responses. Investigate automatic language or country redirects that prevent access to an advertised alternate.

Advertisement

4. Separate hreflang from canonicalization

Hreflang describes the relationship between localized alternatives. A canonical signal identifies a preferred URL among duplicate or sufficiently similar pages; it does not declare a page's language audience.

For independently indexable translated pages, a self-referencing canonical is often appropriate. If regional pages are substantially duplicated and the site intentionally consolidates them, review that canonical strategy alongside the hreflang set rather than blindly changing canonical tags. A cross-language canonical can undermine the goal of maintaining separate localized pages, so investigate it in context.

A correct annotation set is a signal, not a command: search engines make their own indexing, canonicalization, and result-selection decisions. Monitor indexed URLs and search results, but do not treat a single result shown in a local browser as proof that hreflang is working or failing for every user.

5. Handle missing translations and changes

  • No equivalent exists: Omit that language-region entry from the affected page's set. Do not label a homepage or an unrelated page as the missing translation.
  • A regional variant is missing: A broader language page, such as en, may be useful where appropriate; do not claim it is a dedicated en-GB page unless it really serves that audience. Use a suitable x-default fallback separately if needed.
  • A translation is not ready or indexable: Do not advertise it as a live alternate until the intended URL and annotations are ready. Recheck the whole group when it launches.
  • A page moves or is removed: Update the annotations on every remaining member, redirects, canonical signals, and any hreflang sitemap or headers. Remove obsolete targets rather than leaving a broken reciprocal link.

Common Mistakes

  • Listing alternates only on the default-language page and omitting return links.
  • Using the right language code but pointing to the wrong product or a generic homepage.
  • Assuming x-default means English or automatically fills every translation gap.
  • Treating a 200 response as proof that the page is indexable and correctly localized.
  • Fixing hreflang while ignoring redirects, canonical conflicts, or access restrictions.
  • Publishing different URL sets in HTML, headers, and sitemaps without reconciling them.

Best Practices

Keep the inventory close to the system that generates localized URLs, and re-audit affected sets after migrations, translation launches, and changes to redirects or canonical rules. Prioritize high-value templates and pages, then sample the generated output as well as checking individual exceptions.

This article's examples were reviewed without live access to Google Search Central or a code-execution environment. Before implementing or changing a site-wide system, check the current Google Search Central documentation on localized versions and supported language and region codes, and validate the behavior on your own site.

Conclusion

Audit hreflang as a set of relationships between real, accessible equivalent pages. Correct codes and reciprocal links matter, but so do the final destination, localized content, and canonical strategy.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.