Taskcover Agency logo

Local & international SEO

What Is Hreflang, and Do You Need It?

What is an hreflang tag, and when does a website need one?

An hreflang tag is a line of code that tells Google which version of a page is meant for which language or country, so a Canadian searcher sees your Canadian page and an Australian sees the Australian one. A website needs it when the same page exists in two or more versions for different languages or countries.

Key takeaways

  • Hreflang tells Google which version of a page to show to which language or country; it does not translate anything.
  • You need it only when the same page exists in more than one version.
  • Every version must list itself and all the others, and the links must go both ways, or Google ignores them.
  • The code is a language, optionally followed by a country, such as en-US, en-CA or fr-CA. A country alone is not valid.
  • Google says hreflang helps it show the right version; its documentation does not say it raises rankings.

Written byJamiez NguyenFounder & CEO

Reviewed byJohn EdwardCTO

Updated

Fact-checked

Reading time6 min

In this guide

This guide answers “what is hreflang?” for owners whose website serves more than one country or language. It covers when you need the tag, an example, what the codes mean and the mistakes that make Google ignore it. Hreflang is one part of international SEO.

What is hreflang in plain words?

It is a label on a page that points to the other versions of the same page. Suppose an online furniture store has a standing-desk page for the USA, one for Canada and one for Australia, each with its own prices. Hreflang tells Google that the three belong together and which country each is for.

Hreflang

An attribute in a page's code that names the language, and optionally the country, that another version of the page is meant for. It is added as a set of tags, one for each version.

Google says this helps Search point users to the most appropriate version by language or region. Its documentation does not say the tag raises rankings, so expect the right page in the right country, not a higher position.

Do you need hreflang?

Only if the same page exists in more than one version. Google names three situations: the whole site is translated, the content is in one language with small differences by country, or only the menu and footer are translated.

Does your website need hreflang?

  • One website, one language, one countryNo. There is only one version, so there is nothing to choose between.
  • The same pages in English for the USA, Canada and Australia, with different prices or spellingYes. This is Google's case of small regional variations in a single language.
  • The same pages in English and French, or English and SpanishYes. Each language version points to the other.

What does an hreflang tag example look like?

Here is a hypothetical example for the furniture store's standing-desk page. The same five lines go in the head section of all five pages they name.

<link rel="alternate" hreflang="en-US" href="https://www.example.com/us/standing-desks/" />
<link rel="alternate" hreflang="en-CA" href="https://www.example.com/ca/standing-desks/" />
<link rel="alternate" hreflang="fr-CA" href="https://www.example.com/ca/fr/bureaux-assis-debout/" />
<link rel="alternate" hreflang="en-AU" href="https://www.example.com/au/standing-desks/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/choose-country/" />

Each line names one version, who it is for and its full address. The last line, x-default, is the fallback. Google says it is used when no other language or region matches the user's browser setting.

Where do the tags go?

In one of three places: the head section of each page, the HTTP header the server sends, which Google says is useful for files such as PDFs, or the XML sitemap. Google says the three methods are equivalent from its perspective.

Hreflang en-US vs en-CA vs en-AU: what do the codes mean?

The first part is the language and the second, which is optional, is the country. So en-US, en-CA and en-AU are all English, for three different countries.

What common hreflang codes mean
CodeWhat it tells Google
enEnglish, for any country
en-USEnglish, for people in the USA
en-CAEnglish, for people in Canada
fr-CAFrench, for people in Canada
en-AUEnglish, for people in Australia
x-defaultThe page to use when nothing else matches

The language comes from a standard list of two-letter codes (ISO 639-1), and the country from another (ISO 3166-1 Alpha 2). If you have several English versions for specific countries, Google says it is a good idea to also name a catchall English page, marked en, for everyone else. It can be one of the pages you already have.

What are the most common hreflang mistakes?

Almost all of them are bookkeeping errors, and several make Google ignore the tags altogether.

Hreflang mistakes to check for

  • Missing return linksIf the US page names the Canadian page, the Canadian page must name the US page. Google says that if two pages do not both point to each other, the tags will be ignored, so nobody else can name their page as a version of yours.
  • A page that leaves itself outEach version must list itself as well as all the others.
  • A country with no languageGoogle says you cannot specify the country code by itself. Write en-CA, not CA.
  • Codes that do not existGoogle says EU, UN and UK have no effect. The code for the United Kingdom is GB.
  • Shortened addressesEach address must be complete, including https://. A path such as /ca/standing-desks/ is not enough.
  • A canonical tag that points to another languageA canonical tag names the preferred address for a page. Google says that if you use hreflang, the canonical page should be in the same language.

How do you check that hreflang is working?

Google no longer gives you a report for it: its help page says Search Console's International Targeting report has been deprecated. Google says third-party checking tools exist and that it does not maintain or check them. Three checks still work.

  1. Open each version of one important page, view the page source, and confirm that the same set of tags appears on every version.
  2. Follow each address in the tags and make sure it opens the right page.
  3. In Search Console's Performance report, filter by country and look at which of your pages appear there.

Correct tags only decide which version is shown. Getting found in a new country takes the rest of the work as well: see what international SEO is.

Related service

International SEO service

Where your site needs them, we set up hreflang tags and check them on every version, alongside the site structure, research and pages for each country.

See the service

Questions owners ask about hreflang

Is hreflang the same as the lang attribute in HTML?

No. The lang attribute describes the language of the page it sits on. Hreflang points to the other versions of that page. Google says it uses neither of them to detect a page's language; its own systems work that out.

Do the versions have to be on the same domain?

No. Google says alternate URLs do not need to be in the same domain. A page on a .com site and its equivalent on a .ca site can point to each other, as long as both carry the tags.

Can one hreflang code cover a region, such as Europe or Latin America?

No. Google says codes such as EU and UN have no effect on Google Search. Use a language alone, such as es, or a language with one country, such as es-MX.

Will hreflang fix duplicate content between my country pages?

Not by itself. Hreflang labels versions; it does not make identical pages different. Google lists same-language pages for different countries with essentially the same content as duplicates, so give each version its own prices, spelling and details.

Find out which page each country sees.

Send us your website and the countries you sell in, and our free audit will show which version appears where and whether your tags are doing their job.

The authors

Who wrote and checked this guide

Jamiez Nguyen, Founder and CEO of Taskcover Agency

Written by

Jamiez Nguyen

Founder & CEO

Jamiez Nguyen founded Taskcover and leads strategy and client growth. He started it in 2017 as a team doing search work behind the scenes for other agencies, then opened it to businesses in the USA, Canada and Australia.

John Edward, CTO of Taskcover Agency

Reviewed by

John Edward

CTO

John Edward leads the technical side of Taskcover: how sites are built, how fast they load, and how search engines read them.

Updated Fact-checked About the people at Taskcover

Sources

Where the facts in this guide come from

Facts last checked on October 12, 2026.

  1. Tell Google about localized versions of your pageGoogle Search CentralChecked on October 12, 2026
  2. How to specify a canonical URL with rel="canonical" and other methodsGoogle Search CentralChecked on October 12, 2026
  3. What is canonicalizationGoogle Search CentralChecked on October 12, 2026
  4. The International Targeting report is deprecatedGoogle Search Console HelpChecked on October 12, 2026
  5. Performance report (Search results): Overview and basic setupGoogle Search Console HelpChecked on October 12, 2026

Free SEO audit

Find out what search could bring your business.

Send us your website. We will show you where you stand, what is holding you back, and what we would do first.

Free, with no obligation.

  1. You send your websiteA short form. It takes about two minutes.
  2. We review itYour site, your competitors and what your customers search for.
  3. You get a clear planWhat to fix first, what it could bring, and what it would cost.

Taskcover uses necessary storage for security and forms. You can choose whether we use preferences, analytics, and marketing measurement.