The user wants a "hreflang QA playbook."
This implies a comprehensive guide or set of procedures for Quality Assurance specifically regarding hreflang implementation.
The user specified several key areas to cover:
- Currency/language alignment: Checking if the currency matches the language/region targeted.
- x-default: Proper usage of the fallback tag.
- Canonical chains: Ensuring hreflang and canonical tags don't contradict or loop.
- Pagination: Handling
rel="next" and rel="prev" (though Google largely ignores this now, other search engines use it, and the underlying logic of self-referencing canonicals in pagination is still relevant) or more broadly, how hreflang works across multi-page lists.
- Tools for detection and monitoring: What software or scripts to use to find errors.
Structure of the Response:
I should structure this as a professional "Playbook" or "SOP" (Standard Operating Procedure). It needs to be actionable, clear, and organized by the phases of QA (Setup/Audit, Specific Checks, Tools/Monitoring).
Section 1: Introduction & Prerequisites
- Briefly define what hreflang is for (international SEO).
- Pre-requisites: You need a crawl of the site.
Section 2: The Core QA Checklist (The "Rules")
This is where I address the specific user requests.
- Currency/Language Alignment:
- Rule: Does
en-gb show GBP? Does en-us show USD?
- Check: Visually inspect or scrape specific elements (price tags, lang attributes).
- x-default:
- Rule: Must exist for "catch-all." Usually points to the global page (often .com or /en/).
- Check: Is it present on all variants? Is it self-referencing on the default page?
- Canonical Chains:
- Rule: Hreflang must point to indexable URLs. Canonicals must point to the "canonical" version of that specific language.
- Critical error: Hreflang A pointing to B, but Canonical B pointing to A (cross-language canonicalization destroys the signal).
- Self-referencing: Ideally, hreflang includes self.
- Pagination:
- Rule: Hreflang page 1 should map to page 1 of other languages. Page 2 to page 2.
- Canonical logic: Canonicals on paginated series (usually) should be self-referencing now (since Google dropped rel prev/next), but hreflang must map the specific page number, not the root.
Section 3: Tools for Detection & Monitoring
The user asked for tools. I should categorize them by usage (Crawling, Automation, Browser extensions).
- Screaming Frog: The gold standard for specific custom extraction.
- Ahrefs/Semrush: For high-level auditing.
- Google Search Console: For "return tags" errors.
- Python/Scripts: For custom monitoring.
Section 4: The Workflow (The "Playbook" Process)
- Step 1: Crawl.
- Step 2: Validate Code (Headers vs HTML).
- Step 3: Check Logic (Alignment).
- Step 4: Monitor.
Refining the Content:
- Currency Alignment: This is tricky because it's often content QA, not just code QA. I need to emphasize checking the rendered content.
- Canonical Chains: I need to explain the "Clean topology" concept. A cluster of hreflangs must be closed.
- Pagination: This is often overlooked. If I have Page 2 in English, it shouldn't point to Page 1 in French. This is a "Pagination drift" error.
Drafting the response (Mental Outline):
- Title: The hreflang QA Playbook.
- Objective: Ensure search engines serve the right local version.
- Module 1: Implementation Logic (Canonicals & Chains) - The foundation.
- Module 2: The x-default Strategy - The safety net.
- Module 3: Content & UX (Currency/Language) - The user experience.
- Module 4: Pagination & Parameters - The complex edge cases.
- Module 5: The Tool Stack - How to automate.
- Module 6: Reporting.
Self-Correction during drafting:
- Note on Canonicals: Google says if you canonicalize to a different language, you are telling them "this is the original, ignore this one." This breaks hreflang. I must highlight "Self-Referencing Canonicals" as a mandatory rule within hreflang clusters.
- Note on x-default: Often misused. It's for the selector page or the "rest of world" catch-all.
- Note on Tools: Mention
hreflang.org (Merj) as a great free validator.
Final Polish: Use formatting (bolding, lists, code snippets) to make it readable as a reference document.
Let's write it out.
- Phase 1: Structural Integrity (Canonicals & Bi-directionality)
- Bi-directionality: If A points to B, B must point to A.
- Canonical isolation: Don't cross the streams.
- Phase 2: Specific Issues requested
- Currency/Lang: Auto-redirects are the enemy here during QA.
- Pagination: Mapped correctly?
- x-default: Is it consistent?
- Phase 3: Tools
- SF (Screaming Frog) config details.
This looks solid. I will generate the response following this structure.
This playbook outlines the standard operating procedures for auditing and monitoring hreflang implementations. It focuses on high-impact errors that either de-index regional pages or deliver the wrong users to the wrong content.
The hreflang QA Playbook
Phase 1: Structural Integrity (Canonical Chains & Bi-Directionality)
Before checking content, ensure the mathematical logic of the code is valid.
1. The "Closed Loop" Test (Bi-Directionality)
The Rule: If Page A (English) points to Page B (French), Page B must point back to Page A. If the return tag is missing, Google ignores both tags.
- QA Check:
- Extract all
hreflang URLs from Page A.
- Visit each target URL (Page B, C, D).
- Verify that Page B, C, and D all contain a tag pointing back to Page A.
- Common Failure: The US site links to the UK site, but the UK site links only to the DE site, forgetting the US.
2. Canonical & Hreflang Collision
The Rule: A page should generally canonicalize to itself unless it is a duplicate syndicated across domains. However, you cannot canonicalize to a different language.
- Invalid: Page A (EN) has
rel="canonical" pointing to Page B (FR).
- Valid: Page A (EN) has
rel="canonical" pointing to Page A (EN) and hreflang pointing to Page B (FR).
The "Chain" Check:
- Ensure canonicals are not chaining (A -> B -> C). They should resolve to the destination immediately (A -> C).
- Ensure
x-default does not canonicalize to a 404 page.
Phase 2: The "x-default" Logic
The x-default tag signals to search engines which version to serve when no specific language/region match exists for the user (e.g., a user from Brazil visiting a site that only has EN/FR/DE versions).
1. The Catch-All Check
- Requirement: Every page in the cluster must have an
x-default tag.
- Logic Check:
- Does the
x-default point to a generic "International" landing page or the main global version (usually .com)?
- Decision: If you have a specific "Global" selector page, use that. If not, default to your strongest generic market (usually US English or UK English).
- Common Failure: The site has
en-us, en-gb, and fr-fr, but sets x-default to en-gb. This technically works, but it's cleaner to use a neutral page or the dominant market.
Phase 3: Currency & Language Alignment (Content QA)
Structural tags are useless if the content doesn't match the signal. This is the most common cause of "Soft 404" penalties in international SEO.
1. The "Misleading Signal" Audit
The Rule: An hreflang="de-de" tag promises German content for Germany.
- QA Check (Sampling):
- Select 50 random URLs from the sitemap.
- Language: Does the HTML
lang attribute match the hreflang tag? (e.g., <html lang="de-de">).
- Currency: Does the visible price on the page match the region?
- Fail: Tag is
en-gb, price is in USD ($).
- Fail: Tag is
fr-fr, "Add to Cart" button is in English.
2. Automated Detection (Python/Selenium)
For large sites, use a script to scrape the target pages.
- Script Logic: Visit URL -> Check
<span class="price"> currency symbol. Compare against hreflang target.
- Alert: Trigger if
hreflang="en-gb" but currency string contains $.
Phase 4: Pagination & Parameter Handling
Pagination introduces unique complexities where hreflang and canonical often conflict.
1. Paginated Series (rel="next/prev" concepts)
Even though Google has deprecated rel="next/prev", other engines use it, and the logic holds for hreflang.
- The Rule: Page 1 (EN) should link to Page 1 (FR), Page 2 (EN) should link to Page 2 (FR). Do not cross-map page depths.
- Failure: Page 5 (EN) links to Page 1 (FR). This creates a loop.
- Canonical Setup:
- Page 2
en should canonicalize to Page 2 en.
- Page 2
en should hreflang to Page 2 fr.
- Never canonicalize Page 2 to Page 1.
2. Parameter-Based Localization
If you use parameters for languages (e.g., site.com?lang=de):
- Ensure these parameters are not stripped by CDNs or internal redirects.
- Verify the
self-referencing hreflang tag retains the parameter.
Phase 5: Tools for Detection & Monitoring
Do not rely on a single tool. Combine crawling data with GSC data.
1. Screaming Frog SEO Spider (Configuration)
- Setup: Configuration > Spider > Crawl > Check "Hreflang".
- The "Bulk Export": Bulk Export > Links > All Inlinks (or specifically Hreflang).
- Custom Search: Use Regex to find
hreflang tags in the HTML body (which is invalid) vs the <head> (valid).
- Regex:
<link[^>]+hreflang=["']([^"']+)["'][^>]+href=["']([^"']+)["']
2. Google Search Console (GSC)
- Report: International Targeting > Language.
- Key Metrics to Watch:
- "Return tags missing": This means Site A links to Site B, but Site B does not link back.
- "Unknown language code": You used a typo (e.g.,
en-01 or eng instead of en).
3. Aleyda Solis' Hreflang Generator/Validator
- Use this for quick ad-hoc checks on individual page clusters to ensure the XML sitemap syntax matches the on-page header implementation.
4. Merkle SEO Tools (Hreflang Checker)
- Good for visualizing the "network" of links to spot broken loops instantly.
5. Python (Colab/Notebook) - For Enterprise Monitoring
Create a script using Advertools or Requests + BeautifulSoup.
- Workflow: Fetch URL -> Extract Hreflang Dict -> Compare against Database of expected mappings -> Output CSV of mismatches.
Summary Checklist
| Check Item | Pass Criteria |
|---|
| Reciprocity | All return tags exist (A->B implies B->A). |
| Canonical | Self-referencing (mostly). No cross-language canonicals. |
| x-default | Present on all pages; points to global/select page. |
| Content Match | en-gb pages show £ and British English. |
| Pagination | Page n links to Page n in all languages. |
| Indexation | No noindex tags on pages receiving hreflang signals. |