Skip to content

Hreflang Studio

100% client-side

Build a validated alternate-language cluster — export as HTML tags, XML sitemap or HTTP headers.

1 Alternate cluster

0 alternates

    2 Quick build

    Add a region bundle

    Bundles fill URLs from the pattern above when set — otherwise codes only.

    Output

    —

    Cluster checks

    —

      Everything runs locally — your URLs are never sent anywhere. Reciprocal linking is verified on your pages, not here.

      Locale cluster · /pricing 6 versions
      en-us canonical
      en-gb UK
      fr All French
      es-mx México
      x-default fallback
      <link rel="alternate" hreflang="en-us" href="https://ex.com/us/pricing">
      <link rel="alternate" hreflang="fr" href="https://ex.com/fr/tarifs">
      <link rel="alternate" hreflang="x-default" href="https://ex.com/pricing">
      Free forever No signup BCP 47 validated

      Hreflang Tag Generator

      Roughly three quarters of international sites ship broken hreflang. Generate the full reciprocal cluster — self-references, return links, valid BCP 47 codes, x-default — as head tags or sitemap XML.

      Standard
      BCP 47
      Error rate
      ~73%
      Data sent
      0 bytes
      The anatomy

      Three parts, one job

      Every hreflang tag answers three questions for a crawler: what is this, who is it for, and where does it live.

      <link rel="alternate" hreflang="fr" href="https://…" >
      The relationship

      Tells crawlers this URL is an alternate version of the current page — not a separate document competing with it.

      The audience

      A BCP 47 code: language alone (fr) or language + region (fr-ca). Targets the searcher, not the content format.

      The location

      The fully qualified URL of that language/region version. Relative URLs work but absolute URLs remove all ambiguity.

      BCP 47 cheat sheet
      en All English speakers, any country
      en-gb English speakers in the United Kingdom
      es-mx Spanish speakers in Mexico
      fr French speakers worldwide
      x-default Everyone else / language selector
      The golden rule

      Hreflang is a contract, not a suggestion

      Google only honors the cluster when every page agrees. Break one rule and the annotation is ignored — not partially, entirely.

      Self-reference

      Every page must list itself in its own hreflang cluster. A missing self-reference is the single most common implementation error.

      Return links

      If page A points to page B, page B must point back to A. One-way links invalidate the pair — Google discards both.

      Canonical alignment

      The href must match the page's canonical URL. Hreflang pointing at a non-canonical URL sends two contradictory signals at once.

      /en/page
      declares → /fr/page
      both ways
      /fr/page
      declares → /en/page

      One-way hreflang is silently dropped. The generator emits the complete cluster for every URL — paste each page its own copy.

      Delivery

      Three ways to serve the same cluster

      Google treats all three identically. The right choice depends on your cluster size and how easily you ship changes.

      HTML <link> tags

      Most common
      Inside <head>
      Best for
      Small-to-medium sites, teams that ship markup changes easily, and anyone who wants the tags visible in "view source".
      Watch out
      Large clusters (10+ locales) add real bytes to every page.

      XML sitemap

      Best at scale
      In sitemap <xhtml:link> entries
      Best for
      Big multilingual sites — keeps head weight at zero and centralizes the whole cluster in one auditable file.
      Watch out
      Harder to debug; errors are invisible without sitemap tooling.

      HTTP header

      Edge cases
      Link: <url>; rel="alternate"; hreflang="…"
      Best for
      Non-HTML assets — PDFs, downloadable files — and pages where you can't touch the markup at all.
      Watch out
      Rarely supported by CMSs; easy to lose in a migration.
      Failure modes

      The six errors behind ~73% of failures

      Large-scale crawls consistently find broken hreflang on most international sites — and nearly all of it traces back to these six.

      01

      Missing return links

      The #1 hreflang error. If the French page links to English but English never links back, Google ignores the annotation entirely.

      02

      No self-referencing tag

      Each page must declare itself. A cluster where en-us never says "I am en-us" is treated as incomplete.

      03

      Invalid language codes

      en-UK isn't a code — the UK is en-GB. Language must come first, region second (es-mx, never mx-es), and "x-default" is not a language.

      04

      Hreflang on non-canonical URLs

      If /fr/page canonicalizes to /fr/page/, hreflang must point at /fr/page/ — the canonical target — not the redirecting variant.

      05

      Forgetting x-default

      Without x-default (or a fallback locale), users outside your targeted regions get whichever version Google guesses.

      06

      Mixing signals

      Hreflang cluster says one thing, canonicals and internal linking say another. Google resolves conflicts by ignoring hreflang first.

      How it works

      Three steps to a valid cluster

      1. 01

        Add each locale + URL

        Enter every language/region version and its canonical URL. The generator validates BCP 47 codes as you type — en-gb yes, en-UK no.

      2. 02

        Pick your fallback

        Choose which URL serves unmatched users via x-default — usually your global English page or a language selector.

      3. 03

        Copy head tags or sitemap XML

        Export the cluster as <link> elements for your <head> or as xhtml:link entries for your sitemap — every page gets its full, reciprocal set.

      FAQ

      Hreflang questions, answered

      Return links, x-default, canonical interplay, and head vs sitemap delivery.

      01 What is an hreflang tag?

      Hreflang is an annotation (usually a <link rel="alternate" hreflang="…" href="…"> element) that tells search engines which language and regional audience each version of a page serves. Google uses it to show the French page to a searcher in Paris and the English page to one in Toronto — instead of picking arbitrarily.

      02 What does "x-default" do?

      x-default marks the URL served to users who match none of your declared locales — typically a global English page or a language/region selector. It's optional but strongly recommended: without it, Google guesses which version unmatched searchers see.

      03 Do hreflang tags need to be reciprocal?

      Yes — this is the rule that breaks most implementations. If your English page declares the Spanish page as an alternate, the Spanish page must declare the English page back. Each page also needs a self-referencing tag. Missing return links cause Google to ignore the annotations.

      04 What's the difference between hreflang and canonical?

      Canonical picks one master URL among duplicates; hreflang says "these are all legitimate — show each to a different audience." They work together: each locale version self-canonicalizes, then hreflang links the canonicals. Never canonicalize your German page to the English one if you want it indexed.

      05 How common are hreflang errors?

      Very — large-scale crawls have found implementation errors on roughly three quarters of international sites. Missing return links, missing self-references, invalid BCP 47 codes, and hreflang pointing at non-canonical URLs account for most of them. Generating the cluster mechanically eliminates the typo class entirely.

      06 Should hreflang go in the <head> or the sitemap?

      Both work identically for Google. Head tags are easier to inspect and debug; sitemap implementation scales better for large clusters and keeps pages lighter. Pick one method and apply it consistently — mixing methods across pages is allowed but makes audits painful.