Home  /  Articles  /  Hreflang tags

Free tools · How-to

How to add hreflang tags for multiple languages

Tell search engines which page is for which language, then copy the finished link tags into your page heads.

Cordell Digital  ·  Published November 22, 2026

A web page card with arrows leading to two alternate-language page cards

To add hreflang tags, list each language version of a page with its full URL, enter them as language,URL rows in the free Hreflang Tag Generator, add an x-default row, then paste the generated link tags into the head of every version in the set.

If your site has the same page in more than one language or region, search engines need a signal to show each visitor the right version. Hreflang tags provide that signal. Without them, a search engine may show the wrong language version or treat similar versions as duplicates.

Add hreflang tags in four steps

1. List every language version

Write down each version of the page and its full public URL, starting with https. Each version should be a real page in that language, not a redirect.

2. Enter one language and URL per row

In the Hreflang Tag Generator, add rows in the form language,URL. Use a language code such as en or fr, optionally followed by a region such as en-GB or fr-CA.

3. Add an x-default row

Add a row with x-default for the page that should show when no listed language matches the visitor, such as a language chooser or your main version.

4. Generate and paste the tags on every version

Select Run tool, copy the link tags and paste the full set inside the head of each language version, including the page itself. Then view the page source to confirm.

What the result looks like

For the sample rows en-US, en-GB and x-default, the tool produces one link tag per row. Every language version carries this same set.

<link rel="alternate" hreflang="en-US" href="https://example.com/us/">
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">

Language and region codes

ValueMeaningUse it when
enEnglish, any regionOne English page serves everyone
en-GBEnglish for Great BritainYou have a separate UK page
fr-CAFrench for CanadaYou have a separate Canadian French page
x-defaultFallback for unmatched visitorsYou want a default or language chooser page

What the result does and does not do

  • It creates alternate-language link tags from the language and URL pairs you enter.
  • It does not install the tags. You paste them into the head of each language version yourself.
  • It checks the shape of each code and flags duplicate codes. It does not check the full language registry or fetch your pages.
  • It cannot confirm that reciprocal tags are live. Every version must list the full set, including itself.
  • Hreflang does not translate content, replace canonical tags or target cities within one language.

Your inputs and any file you load are processed in your browser. The tool does not send them to a server or save an input history.

Frequently asked questions

How do I add hreflang tags to a page?

List each language version with its full URL, enter them as language,URL rows in the free Hreflang Tag Generator, add an x-default row, then paste the generated link tags into the head of every version in the set.

What is an hreflang tag?

An hreflang tag is a link element in a page's head that tells search engines which language, and optionally which region, a page is for and where its alternate-language versions are.

What does x-default mean?

x-default marks the fallback page for visitors whose language does not match any listed version. It is often a language chooser or the main version of the site.

Which codes can I use in hreflang?

Use a language code such as en, optionally followed by a hyphen and a region code such as GB or CA, for example en-GB. A region code cannot be used on its own.

Do hreflang tags need to point back to each other?

Yes. Each version should list the whole set, including itself, so every page confirms the others. A tag with no matching return tag may be ignored.

Does hreflang translate my content?

No. It only describes which page is for which language. You still need real, equivalent pages in each language.

Does the Hreflang Tag Generator check that my pages exist?

No. It checks the shape of each code and flags duplicate codes. It does not check the full language registry, fetch your URLs or confirm that reciprocal tags are live.

Are my inputs sent to a server?

No. The tool processes inputs and loaded files in your browser and does not save an input history.

Generate your hreflang tags now

Enter your language codes and page URLs, then copy the finished tags.

Open the Hreflang Tag Generator →