Table of Contents[Hide][Show]
SEO is the best way to grow your business or brand and get more people to visit your web site.
Depending on your location and target audience, you might need to consider embracing international SEO to reach others who might not speak your native language.
If you don’t know how to do this, taking advantage of the hreflang attribute is one technical way to start branching into international SEO.
When you implement ‘hreflang’ correctly, you ensure that the correct version of one of your pages is shown to users based on where they’re at and what language they mainly speak.
In this article, I want to focus specifically on the ‘hreflang x-default’ attribute, its usage when deploying ‘hreflang’ across your website or on a given page, and how to implement it.
But What’s hreflang and why Do I Need It?
The hreflang attribute indicates what language the web page should be in based on the location of your target audience and where they’re opening the website from.
Adding the hreflang tag to your landing pages will display the appropriate version language-wise based on their geolocation.
For example: On a random webpage in Spanish you may want to indicate the version of the same in Italian. So, on this page: https://mygreatsite.com/page-x
You would have this annotation in the HTML to indicate the italian version of the page pointing to Italy:
<link rel=”alternate” href=”https://mygreatsite.com/italy/page-x” hreflang=”it-IT” />
and viceversa on this webpage : href=”https://mygreatsite.com/italy/page-x
You would have the following reciprocal annotation:
<link rel=”alternate” href=”https://mygreatsite.com/page-x” hreflang=”es” />
That’s in a nutshell how hreflang is implemented. However, these tags are not for everyone.
If you don’t have an international audience, using these tags might not be worth it for your brand or business.
If you however know you have visitors from different regions and/or countries, you should use these tags.
For example, suppose your website is in Spanish, but you have readers that speak English, Italian, and German. In that case, you should consider adding English, Italian, and German versions of your pages to make them more accessible to your audience.
That way, when someone in Italy opens your website, even if they speak Spanish, they’ll be greeted with an Italian version.
So, when do you use the hreflang x default attribute?
The most common use of the x-default value is given when your website boasts a region-neutral section where you want to direct users to whom the site doesn’t support their preferred language and/or region.
For example, say, your website’s main language is Spanish and targets the following three countries through specific subdirectories Spain, Mexico and Costa-Rica but would also like to target other Spanish speaking countries via a common site location. Then the href annotation would be this:
Example:
<link rel=”alternate” href=”https://myspanishsite.com/spain” hreflang=”es-ES” />
<link rel=”alternate” href=”https://myspanishsite.com/mexico” hreflang=”es-MX” />
<link rel=”alternate” href=”https://myspanishsite.com/costarica” hreflang=”es-CR” />
<link rel=”alternate” href=”https://myspanishsite.com/” hreflang=”x-default” />
In the example above, the version of the website served to a user requesting the homepage from Argentina, Chile or any other Spanish country would be https://myspanishsite.com/ and that’s why the hreflang attribute contains the ‘x-default’ value.
Combining hreflang x-default with a country annotation
A common question with Hreflang x-default is: “does the x-default page have to stay neutral or can it be defined as an alternate language code too?
You may also add the hreflang language alternate to the page that owns the x-default value if you want to reinforce the language flavour and region, for the matter.
Say you want the root level of your domain to target Spain as a country with the language Spanish, which is Spain’s official language, but you also want users from other Spanish-speaking countries to use the same version of the website. Plus you would want to target English from the UK, German in general, and Italian. You would then have the following:
<link rel=”alternate” href=”https://myspanishsite.com/” hreflang=”x-default” />
<link rel=”alternate” href=”https://myspanishsite.com/” hreflang=”es-ES” />
<link rel=”alternate” href=”https://myspanishsite.com/uk” hreflang=”en-gb” />
<link rel=”alternate” href=”https://myspanishsite.com/germany” hreflang=”de” />
<link rel=”alternate” href=”https://myspanishsite.com/italy” hreflang=”it” />
In other words, a web page can have both the x-default hreflang value and the hreflang language (and country) values specified too.
However the x-default hreflang value remains optional. So if you find it easier to ignore it altogether, feel free to.
In fact, this could be a perfectly valid hreflang too:
<link rel=”alternate” href=”https://myspanishsite.com/” hreflang=”es-ES” />
<link rel=”alternate” href=”https://myspanishsite.com/uk” hreflang=”en-gb” />
<link rel=”alternate” href=”https://myspanishsite.com/germany” hreflang=”de” />
<link rel=”alternate” href=”https://myspanishsite.com/italy” hreflang=”it” />
which basically means that the Spain root homepage for that website is the one pointing to Spain, with the subsequent disregard for any other Spanish-speaking regions. The other three annotations remain the same as the previous example.
It is also worth saying that, in this second example of hreflang implementation, the site may still get traffic from other spanish-speaking regions. It’s just that it will be up to Google to figure out where to send it , which will probably still be the homepage.
Going beyond that, if you wanted to make sure such annotation makes it easier for the homepage myspanishsite.com to attract all possible Spanish-speaking traffic, you could simply replace “es-ES” for “es” , which would meant that the homepage targets spanish-speaking users, but not necessarily from Spain:
<link rel=”alternate” href=”https://myspanishsite.com/” hreflang=”es” />
We have gone beyond the actual topic which is hreflang and x-default, but I did it to put into context the various different scenarios in which x-default may be worth using.
Hreflang Language Codes
Before using hreflang tags for your site, you need to know what languages you want to use. Each specific language has its own code you’ll need to use when creating the tags. Here’s a short list of country codes :
- English: en
- French: fr
- Italian: it
- German: de
- Arabic: ar
- Spanish: es
- Simplified Chinese: zh
- Korean: ko
- Czech: cs
You can find a complete list of all the language region codes here if you need languages other than those listed above.
Conclusion: How to Use Hreflang “x-default” on Your Website
The x default attribute of hreflang is to indicate your site’s default version.
Whatever specific website regional or language section you want as your default, this will be what users will see if you don’t have any international language tags. To use hreflang x default on your website, here’s how you can do so:
- Decide what your default language will be (typically the one that you speak or that your preferred audience speaks)
- Add the x default value into your HTML header with a link “x default”
By adding a default page, you can ensure that those who don’t match any of your other hreflang values are still directed to your website, but the default version rather than a specific language version.
Doing this will improve your international or multilingual SEO stranding.
Maximize your website’s reach with hreflang! 🌍💼🔎 Optimize language targeting based on your audience’s location for a personalized experience. Boost your international SEO game! #InternationalSEO #Hreflang #Localization
Frequently Asked Questions
If you still have questions about hreflang x-default tags, the list below may help. Or you may leave your own specific question as a comment and I will surely reply.
What does X default hreflang mean for search engines?
Seeing an x default hreflang attribute means that a specific website doesn’t only offer one language to viewers. There will be regular, general, and international versions of the web pages thanks to alternate URLs with language codes. These are mainly used for a homepage, but they can be added to fit any webpage on a website.
Can you use Hreflang X Default within sitemap files?
You can use hreflang x default tags with your sitemap files. You’ll still use the default hreflang value, language, and region code on your sitemap so that the website knows when to switch between the default and international versions. If you’re going to use the x default on your sitemap, you’ll need to include the namespace and hreflang values.
Can you use Hreflang X-Default for PDF Files?
You can use hreflang x default attributes for your PDF files online. Not everyone chooses to use x-default on their PDF files, but it will help you connect with users in different regions. You can use these values in the PDF files in the response headers.
Do I have to use x-default tags?
No, as mentioned in the article they’re not required. While these tags can be incredibly beneficial for many users and website owners, there’s no law or search engine guideline stating that you have to use the x-default value on hreflang tags.
Leave a Reply