Content SEO International SEO Technical SEO

International SEO: Hreflang Tags

paper boat in glass

If you work for a global brand, you likely have or want to target audiences around the world. 

In fact, for some large brands, over a ⅓ of their overall traffic is international. That traffic could account for millions of organic visits per day.  

Whether you manage SEO for a single region or language, your brand serves, or your SEO work spans multiple regions and languages, staying on top of your international SEO can be tough.  

Why? Because with multiple versions of your pages meant for speakers of different languages, it can be difficult for Googlebot to figure out what content is meant for audiences. You don’t want Google accidentally serving French speakers your English content when French content is available, for example, so how do you avoid mistakes like that? 

Instead of making Googlebot guess and risk getting it wrong, use the method Google has given us to tell them explicitly what content is meant for speakers of which languages — the hreflang tag! 

*Note: This post focuses predominantly on the multilingual aspect of international SEO, which involves offering content in more than one language. The other half of the international SEO coin, multi-regional targeting, involves targeting users in different countries. You can read more about that breakdown in Google’s documentation “Managing multi-regional and multilingual sites.”

What are hreflang tags?

Hreflang tags or “attributes” tell Google that multiple versions of your page exist for different languages. 

In a page’s HTML, they look like this: link rel=”alternate” href=”http://example.com” hreflang=”en-us” />

Here’s what that looks like implemented on a page with multiple language versions: 

example hreflang tag implementation

According to Google, best practices for implementing hreflang tags include:

  1. Canonicalizing the page you’re on to itself
  2. Declaring the language of the page you’re on
  3. Declaring other languages/countries of other versions of the pages
  4. Using x-default to tell Google which page is default if you don’t have a proper translated/targeted page

Hreflang tags help ensure Google serves the right content to the right people, so implement them whenever possible  — never assume that Google can figure it out. 

In general, the more concrete your language signals, the more confidence you can have that Google will rank relevant pages for the right searchers. For example, Google recommends having bi-directional hrefang tags. If you have an English site and you have alternative French and Spanish pages, you’ll need signals on all three pages to point to each other. 

As per Google’s guidelines, “If page X links to page Y, page Y must link back to page X. If this is not the case for all pages that use hreflang annotations, those annotations may be ignored or not interpreted correctly.” 

You’ll also want to be sure to declare the language of the page the visitor is on as well. 

If your main page is english, this is how you would reference hreflang across the pages; arrows pointing in both directions from each page

If your main page is english, this is how you would reference hreflang across the pages

While adding hreflang tags to the HTML of your pages is the most common method for telling Google which language your content is in, there are three other methods to be aware of. 

  1. XML sitemaps
  2. HTTP headers
  3. Google Search Console language targeting

XML sitemaps: can they work for international SEO?

While you can use XML sitemaps to clarify your pages’ declared country and language, we oftentimes see Google run into issues with this method of international SEO. 

Since sitemaps can only hold up to 50k unique URLs and/or 50 MBs, you would hit your limit pretty quickly if you tried to include every version of every page. For example, if you have a 50k URL site with two different languages, your sitemap can in theory hold 150k URLs (with 50k unique). 

The larger your sitemap, the less likely Google will be able to crawl it frequently. On top of that, sitemaps require consistent maintenance to keep them fresh, and Google can’t read bi-directional correlations between your hreflang tags pointing across pages – so it’s not the most efficient way to keep Google up to date on your hreflang tags.

Example of hreflang attribute, located in <loc> within a sitemap. Image from Google

Example of hreflang attribute, located in <loc> within a sitemap. Image from Google

HTTP headers: how effective are they for internationalization?

Placing your hreflang attributes in the HTTP header of your page isn’t quite as common since it requires Google to fetch the page first to then get the header as a response. HTTP headers typically tell Google information like how long to cache a page and other information requested from the server. 

It can be difficult to troubleshoot your hreflang tags in HTTP headers since you would need to request each page you’re testing – a hefty task for a team managing an enterprise site! While we don’t anticipate issues from using HTTP headers, it’s not quite as efficient as adding your hreflang attributes into the HTML of your pages. Additionally, it’s much easier to change your HTML tags yourself or with the help of your developers, rather than asking your engineers to adjust your hreflang server side. 

Google Search Console: does it work for language and country targeting?

Google Search Console’s International Targeting Report is another option you can use in conjunction with your HTML tags. You can use it to monitor your hreflang errors within the “Language” tab of the report or to choose a site-wide country to target within the “Country” tab. However, since many enterprise sites target multiple countries and languages, you’ll want to use your HTML tags to clearly define targeted languages by country. 

Additionally, with the GSC option, you have to manually set up the language or country targeting of your pages.

How to audit your hreflang tags  

International SEO can be tricky. After all, it can result in a lot of similar pages. That’s why it’s critical to provide a clear path for Google at all times.  

A common issue for invalid hreflang tags is when they point to non-indexable pages or if the language isn’t declared. 

explanations of invalid outgoing and invalid incoming

To avoid having an undefined language, lang=”en-US” should be on every page that requires American English. Basically, the more signals the better.

If you’re a Botify customer, you’ll be able to see how many pages on your site were crawled that don’t have a language declared, so you can quickly fix the issue (e.g. if you have hreflang set up for Arabic vs. Spanish vs. English pages, but there’s one pointing to the Portuguese version of the page that doesn’t declare the language of the page in the head). Again, the more signals we send to Google the more confidence they’ll have when choosing a page to rank internationally.

In Botify, you can: 

  • See hreflangs that aren’t recognized
language family and ISO language family
  • Identify if your hreflang is pointing to a non-indexable URL(hreflang is pointing to a page with a noindex, or bad status code, etc.) or if the language is not defined
language distribution pie chart including language not defined

Detecting pages that don’t have a language defined in Botify Analytics
  • Within RealKeywords (in BotifyAnalytics), you can see all of the countries you have English language pages ranking for and which version people are searching for to detect any confusion on Google’s part. 
performance (clicks) by country by day
  • Within LogAnalyzer (in Botify Analytics), you can clearly see if Google is finding your international pages. By looking at countries you have pages ranking for in specific languages, for example, you might detect that 30% of what’s crawled on the entire site comprises US pages.
crawl volume by country
Crawl volume by country
  • Within SiteCrawler (in Botify Analytics), you can uncover trends or issues by observing the frequency at which you’re sending the “x-default” version of your page.
outgoing and incoming hreflang tags
  • And more!

What about providing visitors the option to select their location?

On top of using hreflang tags, you might consider giving visitors the option to select their location while on your pages. For example, if a visitor is an English speaker traveling in another country, they may prefer to look at the site in English rather than the language native to the country they’re visiting (or vice versa!). If you’re allowing the visitor to select their location and preferred language, you should consider providing the option to do so in your website’s top or footer navigation.

For instances like this, you’ll want to make sure you’re providing not only the best accessibility for the visitor but also for Google. If your homepage triggers a pop-up that prompts a visitor to select their location, it’s possible Google will consider the page not-readable. Google doesn’t like big pop-ups on your page, and it likely can’t see beyond it to where the real content lies. 

When it comes to internationalization, success lies in the details

While identifying every version of your pages can sound tedious at first, we can’t stress it enough: success lies in the details! 

Declare your languages and countries in your HTML tags, and provide extra cushion with HTTP headers or Google Search Console targeting if you’d like. Meanwhile, don’t forget about the visitor: Give your global audiences flexibility by providing ways for them to select their preferred language, without conflicting with Google’s best practice guidelines. 

Be generous with your hreflang tags, and always remember to troubleshoot. Properly implementing hreflang tags can open up a whole new world (pun intended) of traffic, and most importantly, provide the best experience to your audiences — no matter what languages they speak!  

Jun 6, 2021 - 5 mins

SEO Content Strategies: Hub and Spoke Model

Content SEO International SEO Technical SEO
Jul 7, 2019 - 5 mins

Top 10 Takeaways from BotifyCONNECT June 2019

Content SEO International SEO Technical SEO
May 5, 2020 - 6 mins

Orphan Pages & SEO: What Are Orphan Pages & How Do I Find Them?

Content SEO International SEO Technical SEO