Hreflang tags are one of the many region-specific SEO tools you have at your disposal. If you have different versions of your website for users in different regions and languages, the hreflang tag is a very useful piece of code that tells Google which version to serve to visitors with IP addresses in different countries and languages.  Hreflang tags are an incredibly powerful tool for companies that do business in multiple countries or areas that speak multiple languages because it helps improve a site’s SEO while improving the end user experience.

In a line of code, the hreflang tag looks like this:

<link rel=”alternate” href=”” hreflang=”es-gt”/>

The first piece of code tells Google that this is an alternate page to show under specific geographical circumstances, the middle piece tells Google what your main site is, and the end of the tag tells Google which language and country it is serving the page to. Using the above example line of code, Google would know to serve the Example Website in Guatemalan Spanish.

Why you should be using hreflang tags to boost your SEO

The purpose of Search Engine Optimization (SEO) is to help your users find what they’re looking for as quickly as possible. Telling Google that you have multiple page versions for different languages helps the search engine offer better results to your users and helps them find what they need faster, and in the appropriate language.

For example, say you own a company that sells organic hair products in Latin America. Your Spanish-language site might rank for the search term “locally made shampoo” if the majority of your users are in Spanish-speaking countries. However, say a user in Belize, an English-speaking country, was looking for your products – you would want to offer them the pages that matched their country’s language, even if it wasn’t the ranking version of your site. This is the type of issue that hreflang solves for multi-language and multi-region business owners.

It’s worth noting that Google might use a user’s IP address to indicate the correct language regardless, but it’s always better to give explicit display instructions to the crawlers when you have created new pages for new regions or languages.

Another reason you should be using hreflang tags is to avoid being penalized for duplicate content if you have multiple versions of the same language. This can sometimes happen if you have different homepages for variations of the same language, for example, multiple versions of the same page for American, Australian, and Canadian users. The content on these pages might be largely the same, with tiny changes for currency, contact information, and pricing, but Google will not know these pages aren’t duplicate content without you specifically telling the search engine that they are alternate pages, simply optimized for local audiences. Google wants to help you improve your users’ experience, so make sure to utilize the power of hreflang tags for cases like this.

<iframe width=”560″ height=”315″ src=”” frameborder=”0″ allow=”autoplay; encrypted-media” allowfullscreen></iframe>

How hreflang tags work

Google introduced the hreflang tag in 2011 to allow a website to differentiate versions of a website to the search engine crawlers. It’s an incredibly useful little piece of code to use when you create content for a specific local audience – Google needs to know that you want those users to see a specific version of the site if they’re searching in your specified language.

Continuing the example situation above, if you were looking to expand your organic hair care products into Belize and you created an English-language version of your Spanish-language homepage, you would tell the search engine to show users the English version of your homepage if they have an IP address that Google believes is in an English speaking country by using the code hreflang=”en”.

By showing users the most appropriate version of your site without making them manually choose which version they want to see, you can decrease your bounce rate, increase your search engine ranking, and improve your overall user experience. Note that hreflang attributes will likely not affect your traffic much – the goal of this SEO tool is to improve the user experience and reduce high bounce rates from visitors landing on the wrong version of your site.

Another useful way to use hreflang tags is for content geared toward users who speak different variations of the same language. Google designed hreflang tags allow you to get even more specific than just specifying which language the content is for, but also which variation of that language. For example, an American company could create content to market to users who speak Canadian English by using the tag hreflang=”en-ca”. This tag is also useful to use IP address to detect things like which currency to display, shipping costs, seasonality, and other location-based factors.

Hreflang tags can also be used to tell Google to display a different version of your site’s template, even if the page content remains the same. This allows you to display different location-based versions of things like navigation menus, footers, forums, and contact info.

A few notes about hreflang tags:

The hreflang tag is a cue for Google to help improve the user experience – it is not a mandate. This means that occasionally, other SEO factors or things like VPNs and location services may override the hreflang tag and result in another version of your site ranking higher. It’s difficult to control all these factors, but you can ensure that you’re giving Google the best possible directions about which pages to display by adhering to international SEO best practices.

In addition, it’s important to know that Google and Yandex are currently the only two search engines that use hreflang tags. Bing uses language meta tags to know which language to display. If your users come from multiple search engines, it’s a good idea to incorporate both language variation strategies.

How to insert hreflang tags on your site

Your hreflang tag needs to include a value for the language your alternate page is in, as well as the region, if applicable. The language must be in ISO 639-1 format, and the region, which is optional, needs to be in ISO 3166-1 Alpha 2 format. Both the language and the region will be two-letter codes.

There are three places that you can insert an hreflang tag:

  1. The on-page markup
  2. The HTTP header
  3. The sitemap

On each page that you create a language variation for, the hreflang attribute needs to include a reference to itself and all of its corresponding alternate pages. Using our Latin American hair product example, the hreflang attributes for your site’s homepage (which is in Mexican Spanish) would look something like this:

<link rel=”alternate” href=”” hreflang=”es-mx” />

And your alternate homepages, which were created for Belizean English and Guatemalan Spanish, would look something like this:

<link rel=”alternate” href=”” hreflang=”en-bz” />

<link rel=”alternate” href=”” hreflang=”es-gt” />

It’s easy to make mistakes when it comes to inserting language variation tags, so double check your audience’s ISO language and region codes when you’re adding the tags. If you find yourself with broken code or aren’t sure about your ability to add these tags yourself, it’s best to hire an engineer who can help you correctly integrate these tags into your source code.

What’s the difference between Canonicalization and Hreflang?

Canonicalization and hreflang are similar tools but are used for two different purposes. The Canonicalization tool is used to tell a search engine which version of a page is the original to avoid a site being dinged for duplicate content, in cases were the page variations are nearly identical and in the same language. Hreflang attributes are used to signal to the search engine to show a different version of the same page to users in specific languages or regions.

According to Google, you shouldn’t use canonical tags (rel=”canonical’) for country or language variations on your site, but for page duplicates within the same country or language, it can be very useful.

Leverage expert help for region-specific SEO

Ready to tackle the task of localizing your site for various languages and regions? Creating multiple versions of your site’s content can be stressful, not to mention accounting for things like SEO optimization across language versions of your site. Fortunately, you don’t have to do it all alone. Big Leap’s SEO team has helped countless small businesses like your grow their customer base across geographical and linguistic lines with smart SEO strategies and consistent support. Sign up for a free consultation with a Big Leap SEO consultant today and find out how much more you could be doing when it comes to international business.

Latest posts by Meg Monk (see all)