Skip to content

Validate hreflang across markets

Build a locale matrix and trace missing, conflicting, or broken alternates back to the templates that publish them.

Steps

  1. Start with equivalent pages

    Group URLs by the topic and visitor task they share. Record each URL’s expected language and region. Confirm that the chosen destination actually shows the corresponding content before evaluating its alternate signals.

  2. Extract the declarations and their sources

    Capture the relevant HTML tags, HTTP Link headers, or sitemap entries for each URL. Write down the exact code-to-URL pairs and the source that published them. Compare declarations where more than one method is in use.

  3. Validate each target and code

    Check that alternate values use fully qualified URLs and valid language and optional region codes. Test each URL’s response, redirects, robots directives, and canonical. Investigate alternate URLs that point to the wrong page or canonicalize away from the intended equivalent.

  4. Verify self-references and return links

    Check that each page lists its own URL and that declared alternates link back. Compare the locale sets across pages and flag missing or contradictory entries. Check x-default against the intended fallback when the site uses it.

  5. Identify the publishing fix and retest

    Group repeat issues by the template, CMS field, or sitemap rule that emits them. Specify the expected replacement declaration and rerun the affected locale cluster after the change.

Sample locale matrix

The US and UK service pages should recognize each other as equivalent regional versions.

LocaleTargetResponse and canonicalAlternate evidence
en-US/us/repairs200, self-canonicalDeclares en-US and en-GB.
en-GB/uk/repairs200, self-canonicalDeclares en-GB. Add the return link to en-US.
x-default/choose-region200, self-canonicalMatches the approved country selector.

Prompt for your agent

Validate hreflang for these expected locale clusters [attach URL and locale map]. Capture each source page’s status, canonical, and declared alternates with the HTML, header, or sitemap evidence. Verify each language and region code, alternate URL, self-reference, and reciprocal pair. Return a locale matrix and a list of problems grouped by template or publishing source, with each expected correction and a retest.

Sources