Hreflang Generator

Generate hreflang tags for multilingual and multi-regional websites.

Add one row per language/region version of your page. Include an x-default row for the fallback URL.
Language / Region URL

📐 How to Use

  1. Add each language version of your page by entering the URL and selecting language/region.
  2. Add an x-default row for the fallback URL.
  3. Click Generate to get all hreflang tags as a block.
  4. Paste the entire block into the <head> of EVERY language version of the page.

🎯 When to Use This

  • Launching a Spanish version of an existing English page and needing both link blocks written before either one goes live.
  • Separating en-US and en-GB storefronts that sell the same catalog at different prices, where the wrong version in search costs orders.
  • Rebuilding an annotation block after a URL structure change, when the old tags still point at paths that have moved.
  • Drafting the tag set for a translator or developer to add to each template, with codes picked from a list rather than guessed.

❓ Frequently Asked Questions

QWhat does hreflang do?
Hreflang tells Google which language and regional version of a page to serve to users in different locales. Without it, Google may show the wrong language version in search results.
QWhat is x-default?
x-default is the fallback page shown when no other hreflang value matches the user's language or region. Usually your main/English version.
QDoes every page need hreflang on every version?
Yes — hreflang must be reciprocal. If page A references page B, page B must reference page A. The full set of tags must appear on all versions.

ℹ️ About This Tool

An hreflang annotation is a link element saying that the same content, for a given language or locale, lives at a given URL. The value is a language code, optionally followed by a region, as in en, en-GB or pt-BR, and the special value x-default marks the page to serve when nothing else matches. A page's annotations are read in isolation, so every version carries the whole list, including a line pointing at itself. Google uses these signals to choose a version; support in other engines varies.

This builder holds a list of language and URL rows, with the language picked from 56 codes including x-default. Generating writes one link rel=alternate line per row that has a URL. Rows with an empty URL are skipped, and the rest appear in the order you arranged them.

⚠️ Notes & Limits

  • The list holds 56 codes. Combinations outside it, such as en-NZ, fr-BE or es-CO, cannot be selected and have to be edited into the output by hand.
  • Nothing checks that your URLs return 200, serve translated content or carry the matching block in return, which is where most hreflang setups come apart.
  • Duplicate rows are not detected. Selecting en twice produces two conflicting lines and the tool leaves them both in the output.
  • Only the link-element form is produced. Annotations delivered in an XML sitemap or in HTTP headers, which non-HTML files need, must be built elsewhere.