All about Hreflang Tags and X Default for International SEO

All about Hreflang Tags and X Default for International SEO

What is International SEO?

Normally SEOs of 2022, like to go niche and focus on a specific range of services for specific countries. Local businesses and most businesses have a limited geographical area where they operate, be it a state, city or a particular country. 

Hreflang Tags and X Default for International SEO

But what if a business tries to go global? How would businesses try to target and rank each individual country? And then comes the question of language, and how to show the correct language content to the correct user.

The Introduction of HrefLang Tags

Hreflang tags were introduced by Google to help webmasters specify to google the correct version of the website to be shown for the specific type of users, language or location. This was introduced in 2011 and helped users and search engines to serve the right type of content to the right type of users to improve the user experience.

For example, hreflang tags can be used to serve the specific type of content for English Speaking audiences for both US and UK separately. 

Here’s a code snippet for an hreflang tag for a user in the UK: 

Let’s break this up a bit. 

Rel = “alternate” couple with an hreflang tells google that the following HTML link is an alternate variation of similar pages.

href = “url link” tells google that the exact URL mentioned in the quote is the URL under observation.

Implementation of Hreflang Tags

Hreflang = “en-gb” tells google that the URL within the quotes is the right variation for UK-based users and uk language speakers.

Lets review another example: 

This code snippet clearly differentiates and specifies that there are different types of content for different languages, namely Australia, USA and UK. Each correct variation is properly indicated in under the href = “link” element.

Another reason for using an Hreflang attribute will be if the currency on the specified URL has a different currency, for example, US dollars versus UK pound. In that case, using hreflang tags becomes beneficial in serving the right page to the right type of users.

Region Codes and ISO Languages

There are countless SEOs who make the mistake of putting the wrong language and region codes which ultimately confuse Google and does not serve any purpose. 

For example: the more popular example is of “en-eu”. Check the screenshot below:

Google supports the ISO 639-1 format for language codes, and you can get more specific by using the ISO 3166-1 Alpha 2 format to signal which region you’re targeting.

Another common mistake is using “en-uk” instead of  “en-gb” which is the correct variation for UK region.

Its always best to avoid confusion and generate hreflang tags using a hreflang tag generator.

Here a popular generator that we recommend. Check the link below: 

http://www.internationalseomap.com/hreflang-tags-generator/

The Purpose of X = default and how to use them

Google introduced the hre lang = “x-default” to serve any user a default page in case its particular location or region-specific href lang attribute has not been specified. This helps search engines display the default page in case it’s not able to figure out the right type of content to show to any user based on his/her search settings.

Here’s how it looks: 

In this case, if a user visits the domain from a country let’s say, India, then https://example.com/ is the URL that will be shown to the specific user. Any user coming from countries and languages other than UK, US or Australia will be shown the default URL under the x-default attribute.

Is X-default Optional or Compulsory?

X default is definitely not an obligation and you may get away by not having to use them at all. Google systems have evolved a lot in the last few years to the point that they can clearly distinguish and specify the best kind of content to be served to the specific user.

But yes giving the “X-default” gives you control instead of Google. So that’s a nice thing to have. 

It is also unlikely that your English language page is going to show up for a Spanish-speaking user searching under the Spanish search settings.

Ways to Implement the Hreflang Tag

The following methods can be applied to implementing the hreflang tag for your site.

  • HTTP header of each page
  • XML sitemap
  • Header of the HTML code of each page 

Implementing Href Lang Tags on HTML Header of the Page

Out of these using implementing the changes on the HTTP header of the page is the most common and preferred way. Here is a snippet on how its done: 

Keeping this code snippet between the  <head>…</head> HTML of the pages is the way to implement the hreflang tag on the header of each page.

Implementing Href Lang Tags on Sitemap

Here’s how you can implement the same href lang tags on the Sitemap file of the website. 

Using Hreflang tags in a sitemap is less effective however can be coupled with the first method to ensure proper indexing of hreflang attributes.

Canonicalization and Href Lang. What is the Difference? 

The main difference between the Href lang attribute and the canonical attribute is that canonicals distinguish the dominant URL among a set of URLs to be shown in the search. Thus making the less dominant urls “non – indexable”.

Where href lang attributes specify the correct use of different URLs for different regions and languages based on certain conditions. None of the alternate urls is dominant or recessive, instead, they simply show up in Google under different circumstances and different conditions. 

And obviously, none of the URLs remains indexable in Google Search, unlike the implementation of Canonical Tags.

Do HrefLang Tags Really Affect Ranking?

You won’t notice a difference in ranking after using hreflang and x-default markup, but it is one of Google’s advised best practices, according to John Mueller of Google. The major goal would be to more effectively target your global audience and provide searchers from various locations or who speak various languages with a better user experience. A higher click-through rate, more goal completions, sales, and return on investment (ROI) may result from properly targeting your material to international consumers.