# Hreflang Audit skill for Claude

Hreflang Audit checks hreflang on multi-language sites for broken return tags and invalid codes, then writes the corrected tags or sitemap

A 2-minute read, updated Nov 30, 2026

The recorded run

Read the run as text

Our boot page has US, UK, German, Austrian and French versions and weak French and UK sales, so audit the attached head tags, Google canonicals and Search Console export and fix the tags

- head-tags.txt 33 lines
- google-selected-canonicals.txt 5 lines
- gsc-pages-by-country.csv 40 rows

Using the skill **Hreflang Audit**

Checking 5 language versions against checks 1 to 8

Markup checks 1 passed 2 to check 3 failed

- failed: Self-reference missing on /fr/
- failed: Return tag missing: /de/ does not list de-AT
- failed: Invalid region code en-uk on all 5 pages, use en-GB
- needs a look: /de-at/ folded into /de/ by Google (canonical)
- needs a look: http:// link and trailing slash mismatch
- passed: One x-default per set, on every page

Matching 40 Search Console rows to the set, market by market

Share of impressions going to the wrong URL (/en-us/)

- UK 61 6,900 of 11,305
- France 60.1 5,480 of 9,120
- Belgium 39.6 960 of 2,425
- Germany 7.9 /de/ leads with 91.1%

Market check

| Market | Intended | Google shows | Cause |
|---|---|---|---|
| FR | /fr/ | /en-us/ 60.1% | No self-reference on /fr/ |
| GB | /en-uk/ | /en-us/ 61.0% | Invalid code en-uk |
| AT | /de-at/ | /de/ 89.7% | Not proven: canonical is /de/, confirm with live search |
| DE | /de/ | /de/ 91.1% | Working |

Corrected block for all five pages: **en-uk** becomes **en-GB**, /de/ gains the **de-AT** line on HTTPS, /fr/ gains its self-reference. A matching `hreflang-sitemap.xml` is included if you prefer one file.

Issues by severity

- Ship the corrected tags on all 5 pages in one deploy
- Check the shared template: other products likely repeat en-uk
- Search from Austria to see if /de-at/ still shows
- Re-run the market check two weeks after recrawl

The run is one sample task, kept exactly as it came out

- [Download the skill: hreflang-audit.zip (19 KB)](https://marketingengineeringacademy.com/downloads/hreflang-audit.zip)

- Files: 8

- SKILL.md: 433 lines

- Works in: claude.ai, Claude Code

- Area: [Technical SEO](https://marketingengineeringacademy.com/areas/technical.html)

Technical SEO

- [Schema Builder](https://marketingengineeringacademy.com/skills/schema-builder.html)
- [Site Architecture](https://marketingengineeringacademy.com/skills/site-architecture.html)
- [Schema Markup Checker](https://marketingengineeringacademy.com/skills/schema-markup-checker.html)
- [Schema Markup](https://marketingengineeringacademy.com/skills/schema-markup.html)
- [Page-Level SEO Audit](https://marketingengineeringacademy.com/skills/page-level-seo-audit.html)

How it works

## How Hreflang Audit works step by step

### Every language version of the page

It reads the head tags, HTTP headers or sitemap for each language version, from a URL or from text you paste

Step **1** of 6

## The markup checks

Every page must link to itself, and every link must be returned: if A points to B, B must point to A, or the signal fails for both. Language codes must be ISO 639-1 (en rather than eng, ja rather than jp), regions ISO 3166-1 Alpha-2 (en-GB rather than en-uk, with no es-LA or EU). Hreflang belongs only on canonical URLs and must match them exactly, trailing slash and HTTPS included.

## Severity and fixes

A missing self-reference or return tag is Critical. Invalid codes, hreflang on non-canonical URLs and a Google-selected canonical that differs from the declared one are High. HTTP/HTTPS mixing and trailing-slash mismatches are Medium. Using both HTML and sitemap at once is Low.

## What Google does in each market

Check 9 lists, for each country, which URL in the set gets impressions and clicks, and flags versions with zero impressions in their own market. Because Search Console credits data to the Google-selected canonical, a folded regional page needs a live search from that country before a mismatch is reported. Without Search Console data the check is marked not run, with the exports needed.

## Generating the tags

It detects languages from paths, subdomains, TLDs and the lang attribute, maps equivalent pages, validates codes, adds self-references and an x-default, then outputs code. HTML tags suit pages with under 50 variants, HTTP headers suit PDFs, and an XML sitemap suits large or cross-domain sites, split at 50,000 URLs or 50MB.

## Optional deeper reviews

A content parity audit compares translations by page existence, H2/H3 structure, SEO elements, word count and freshness. A cultural adaptation review scores each version 0 to 100 on CTAs, trust signals and local formats, for example 1.000,00 on de-DE pages.

## Rules it keeps

Thresholds and limits written into the skill, each with the reason behind it

Missing self-referencing tags cause Google to ignore the entire hreflang set

This is why a missing self-reference is rated Critical

If page A links to page B with hreflang, page B must link back to page A

A one-way link invalidates the hreflang signal for both pages

The UK code is en-GB, because en-uk is not a valid region code

An invalid region code is rated High and gets replaced with the valid ISO code, en-GB

If a page has rel=canonical pointing elsewhere, hreflang on that page is ignored

Hreflang only works on canonical URLs that match exactly

Country targeting in Search Console is never suggested, since hreflang is the lever left

The International Targeting report and manual setting were removed in 2022

## What it needs and what comes back

You give it

- A page URL or the pasted head tags of each language version
- Search Console export of clicks and impressions by page and country
- Google-selected canonical for each version from URL Inspection
- A URL or content folder for a parity audit

It hands back

A validation report with a summary, a per-URL status table, a per-country market table and recommendations, followed by corrected HTML tags, HTTP headers or an hreflang sitemap

### When it helps

- Your English page ranks in Germany although a German version exists
- You are launching a new language or country version of the site
- You moved to HTTPS or a new CMS and need to confirm the hreflang sets survived

## Prompts to start with

Audit hreflang on example.com/de/pricing and every alternate it lists, then tell me what is broken and give me the fixed tags

Generate an hreflang sitemap for the en-US, en-GB, fr-FR and de-DE versions of our 400 product pages, with x-default pointing to the US version

Find out from this Search Console export by page and country why our UK page keeps showing in Australian results

## Adding it to Claude

claude.ai

Download `hreflang-audit.zip`, upload it still zipped in Settings, Capabilities, Skills and ask for the job in a new chat, as Anthropic's [help article on using skills in Claude](https://support.claude.com/en/articles/12512180-use-skills-in-claude) shows

Claude Code

```
unzip hreflang-audit.zip -d ~/.claude/skills/
```

To use it in one project only, move the folder inside the zip (it is called `seo-hreflang`) into that project's `.claude/skills/`, as the [Claude Code skills docs](https://code.claude.com/docs/en/skills) describe

## Inside the zip

- [hreflang-audit.zip: 8 files in 19 KB](https://marketingengineeringacademy.com/downloads/hreflang-audit.zip)

- seo-hreflang/
- CHANGES.md 3 KB
- SKILL.md 24 KB
- references/
- content-parity.md 4 KB
- cultural-profiles.md 5 KB
- locale-formats.md 3 KB
- machine-translation-qa.md 3 KB

## Questions

Will it change hreflang on my site?

No, it returns findings and code to paste into your pages or sitemap, and you or your developer deploy it

Can it tell whether Google actually uses my hreflang?

Partly, since valid markup is checked from the pages alone, while seeing which URL Google shows in each country needs Search Console data by page and country, and without that data the check is marked as not run

More in Technical SEO

- [Schema Builder: JSON-LD code for each page type, checked against Google's current rich results](https://marketingengineeringacademy.com/skills/schema-builder.html)
- [Site Architecture: Plans the page tree, URLs, navigation and internal links of a website](https://marketingengineeringacademy.com/skills/site-architecture.html)
- [Schema Markup Checker: Checks the schema on a page for errors and writes JSON-LD you can paste](https://marketingengineeringacademy.com/skills/schema-markup-checker.html)
- [Schema Markup: JSON-LD for each page type, checked against Google's required fields](https://marketingengineeringacademy.com/skills/schema-markup.html)

---

HTML version: https://marketingengineeringacademy.com/skills/hreflang-audit.html
