Rel="Alternate" Hreflang Tag meaning in English

Rel="Alternate" Hreflang Tag

What is the Rel="Alternate" Hreflang specification?

Rel="Alternate" Hreflang - Definition, Guide & Usage Examples

Google uses the Hreflang specification to understand and serve the best URLs for regional and language based queries.

This means that if you have websites or resources targeting specific languages or regions you can use the specification on your website to tell Google the best URLs to serve.

Let's give a practical example: a British company that operates a sales operation and website in the UK, the United States, and in Germany.

This company wants its customers in each country to go to the correct website for their location - though it also wants all general English visitors to go to the UK website, and all German speakers to go to the German website.

Hreflang Examples

You might use on-page markup in the following way on a resource:

<link rel="alternate" href="https://www.example.co.uk/" hreflang="en-gb" />
<link rel="alternate" href="https://www.example.com/" hreflang="en-us" />
<link rel="alternate" href="https://www.example.de/" hreflang="de-de" />
<link rel="alternate" href="https://www.example.com/" hreflang="en" />
<code><link rel="alternate" href="https://www.example.com/" hreflang="x-default" /></code><link rel="alternate" href="https://www.example.de/" hreflang="de" />Code language: HTML, XML (xml)

Note that you should not include a country code on it's own. Google will not automatically work out which language you are targeting if you specify a country, so always make sure to include a language.

Ways of Implementing Rel="Alternate" Hreflang

There are three ways of implementing Rel="Alternate" Hreflang:

On-page

Add the information in the <head> section of a webpage using link elements.

HTTP Header

If implementing with on-page markup is problematic you can use a HTTP header instead.

Sitemap

Another alternative that may be useful for large websites is the ability to implement the Hreflang specification inside sitemaps.

What is the Rel="Alternate" Hreflang Code for UK Sites

The country code for the UK is GB - not UK. This is a common mistake websites make (be careful!).

If you were targetting the UK you would use en-gb which specifies English as a language and the UK as a region.

<code><link rel="alternate" href="http://example.co.uk/" hreflang="en-gb" /></code>Code language: HTML, XML (xml)

No, using the Hreflang specification does not share link authority. You can read more on this here.

Hreflang Language & Country Codes List

To find the appropriate language code the list to check is ISO 639-1.

The region code uses ISO 3166-1 Alpha 2.

x-default Fallback

As part of the specification websites can include a fallback for unmatched languages using the following format:

<link rel="alternate" href="http://example.com/" hreflang="x-default" />Code language: HTML, XML (xml)

This is especially needed on auto-redirecting homepages.

Is Rel="Alternate" Hreflang A Directive or a Signal?

Href is treated as a signal by Google not a directive, which means that if other factors indicate another URL would provide a better result Google may serve this page instead.

Need help with international SEO?

Find all this confusing? It is complicated stuff, but no problem. Get in touch and we can help out with your HrefLang tags or provide international SEO consultancy.

Citation URL

https://www.searchcandy.uk/seo/seo-glossary/rel-alternate-hreflang-definition-guide-usage-examples/

Last modified: Created:

What is this content? This article is part of an SEO glossary and reference guide created by Search Candy - an SEO consultancy based in the UK. The Search Candy team is committed to providing content that adheres to the highest editorial standards. The date this article was created and last checked for accuracy is posted above. To reuse this content please get in touch via our contact form.
chevron-down