Toolvist

Hreflang Tag Generator

Generate hreflang link tags for multi-language and multi-region sites.

Free Hreflang Tag Generator

Generate correct hreflang link tags to tell search engines which language and region each version of a page targets. Proper hreflang tags prevent duplicate-content penalties on multilingual and multi-region websites.

For sites that are not fully localised, the Canonical Tag Generator is the more appropriate tool, and the Sitemap Generator can express the same relationships. To convert a non-Latin name into a usable path, the Punycode Converter handles the host part.

How to use the Hreflang Tags

  1. 1 Enter the URL for each language and region version of the page.
  2. 2 Specify the language code, and the region where the content differs by region.
  3. 3 Add a default or fallback version for unmatched languages.
  4. 4 Copy the tag set into every version of the page, including all the alternates.

Why the annotations exist

The problem they solve is that identical content in several languages looks like duplicate content to a search engine. Without annotation, the engine may index one version and ignore the rest, or may serve an English page to a German searcher. The annotations declare the relationship explicitly, letting each version rank in its own market rather than competing.

They are also the mechanism behind serving the right version to the right visitor. If the annotations are complete and correct, a search engine can show the German version to a searcher in Germany without you implementing any kind of redirect or geolocation.

Getting the set right

  • Include the self-referencing tag on every page; a set missing it is commonly discarded.
  • Use the correct region codes rather than inventing them, since only assigned codes are understood.
  • Keep the annotations reciprocal — if page A lists B, page B must list A.
  • Point each tag at the canonical URL of that version, not at a redirect or a parameterised variant.

Hreflang best practices

Every page in the set should reference itself and all the other versions — creating a reciprocal set. Use language-only codes (like de) for a single-language site and language-region codes (like de-AT) when you have region-specific content. Always include an x-default pointing to a language selector or the primary version.

Frequently asked questions

What is the difference between a language code and a region code?

A language code identifies the language, such as English or Portuguese. A region code narrows it to a market, which matters when the same language is written differently in different places. English for the United Kingdom and English for the United States use the same language code but different region codes, and treating them as one loses the distinction.

Where do the tags go?

In the head of every version of the page, and each version must list all the others including itself. This is the requirement most often got wrong. A set where each page lists only the alternatives and not itself is incomplete and may be ignored, and a set where only one page carries the tags is not a set at all.

What if I get it wrong?

The consequences are that the wrong version is served to some users or that the versions compete with each other in search results. It is usually not a penalty — it is a missed opportunity, since the whole purpose is to serve each visitor the version written for them and to let each version rank in its own market.

Related SEO & Webmaster Tools

Browse all SEO & Webmaster Tools →

You might also need

Tools from other categories that people pair with the Hreflang Tags:

Browse the full tool directory →