Hreflang generator
Add each language or regional version once. Get the complete reciprocal set as HTML, an HTTP header, or XML sitemap entries.
Generated hreflang
Add at least two localized URLs.
Every localized page needs the complete set
Each language version must reference itself and every other version. The generated HTML and HTTP header output is the same complete set for every page in the group.
Google's localized page documentation also requires complete URLs and reciprocal links. One page pointing to another without a return link can be ignored.
Choose one implementation method
HTML tags, HTTP headers, and XML sitemaps are equivalent methods for Google Search. Pick the one your team can keep accurate. Maintaining the same annotations in three places creates more chances for them to drift.
Use language, script, and region codes carefully
Start with a two-letter language code such as en or fr. Add a region only when the page genuinely targets it, such as en-GB. Script values such as zh-Hant are also accepted, and x-default can point unmatched users to a language selector or fallback page.
Keep canonicals aligned with localized URLs
Each localized page normally needs a canonical that represents that same localized version. The canonical tag checker can inspect the HTML before you publish the hreflang set.
Your URLs stay in the browser
The generator validates and formats the entries in this browser tab. It does not fetch the URLs or upload the list.
What hreflang does in search
Hreflang tells Google that several pages are versions of the same content for different languages or regions. When one of them ranks, Google can swap in the version that suits the searcher, so a reader in France sees the French page instead of the English one. It does not make any page rank higher, and it does not stop Google treating near-identical regional pages as duplicates when they are left unlinked.
Fix common hreflang errors
- No return links. Page A lists page B but B does not list A, so Google can ignore the pair.
- Missing self reference. Each page must list itself as well as the others.
- Wrong codes. The region for the United Kingdom is
GB, soen-UKis invalid. A region alone, such asgb, is invalid too. - URLs that redirect, are noindexed or point their canonical elsewhere. List only the final, indexable URL of each version.
- Relative URLs. Use full URLs with the protocol and host.
Check hreflang across your site with your agent
One set is easy to check by eye. A whole site is not. The seo crawl command reads hreflang on every page it reaches on your machine and reports malformed values, repeated values and pages that leave themselves out of their own set. Your agent can then fix the template and paste the corrected set here to check it. Ask:
Crawl example.com and list the pages with hreflang errors, then check whether each language version links backThe crawl runs from the CLI on your machine. Install it and run setup:
npm i -g seo && seo startOr add the hosted MCP server to your agent and sign in with Google:
Run it in a terminal, then sign in with Google.
Or run it on your machine
Installs the CLI, signs you in and adds the skill to your agents. Site crawls and Bing data run this way, on your own machine. A crawl fetches many pages, and Bing blocks our hosted server.