The Roaring PJ Blog

How the Hreflang Tag Boosts Your International Site’s SEO

Get The Roaring PJ Blog in your inbox!

This field is for validation purposes and should be left unchanged.
How the Hreflang Tag Boosts Your International Site’s SEO

By Melanie Yunk | March 17, 2019

Correctly using the hreflang tag offers many benefits for SEO if you run a website with target audiences in multiple countries, languages or even dialects of a single language.

For all its power, Google is still a machine and doesn’t know what it’s reading unless you properly identify your content. The Hreflang tag tells Google the language of a page on your site and the country the page serves. This tag ensures different pages on your site end up in front of the right people.

What is hreflang?

Pronounced “h-ref-lang”, hreflang is an HTML tag used in the backend HTML of your website that tells Google all of the language and/or country variants of a given url on the site. You may translate the same set of pages into different languages for different audiences and you want to identify the language for each version of a webpage.

Perhaps you ship products to many parts of the world - someone in Sweden doesn’t want to see information about costs and shipping to the United States. With this tag, you can tell Google which url contains Swedish content and provides information and costs for shipping to Sweden.

The hreflang tag also prevents Google from assuming you’re making duplicate content; pages for the UK and US are similar content-wise since they are both in English, but they serve different countries. This tag helps Google know you aren’t duplicating content but in fact making slightly different content for each place.

How does hreflang work?

Like other HTML tags, hreflang can be easy to get wrong if you flub the syntax. Luckily, there are tools online to help you.

The first thing to know is there are three places you can put the code, and where you choose to put it determines how you write the code. The three locations are in the:

If you choose to add this to the HTML code in the <head> you will want to add all of the language variants including itself in the tags. (see Google article)

The first part of the code specifies the url and the second part specifies the language and/or country. For example, the code might look like this:

<link rel="alternate" href="https://www.example.com" hreflang="en-us"/>

Here you are specifying the url https://www.example.com is in American English (en-us).

You can differentiate between the same language spoken in a different country, e.g. Spanish from Spain and Spanish from Mexico. In hreflang, this might look like

<link rel="alternate" href="https:/www./example.com/es" hreflang="es-es"/>

<link rel="alternate" href="https://www.example.com/mx" hreflang="es-mx"/>

The first url is in Spanish from Spain and the second is in Spanish from Mexico.

A user’s current location and language settings determine what they see when they search in Google. If someone’s IP address gives the impression they are in a country in which a certain language is spoken, they are more likely to get results in that language.

If all this sounds a bit too technical, fear not: there are tools you can use to generate hreflang code. There are also great companies out there like Webcertain who are experts at international SEO and can help you if it’s all a little too much.

On the other hand, if you want to get started tackling the code yourself, Google’s own post about hreflang is a good place to start, as well as this post from Moz.

Examples of sites using hreflang well

Let’s take a look at a site using hreflang effectively. When I query ‘Zara’, Google brings up the US English version of their site because my default Google search settings are for American English:

Screen Shot 2019-02-28 at 10.16.58 AM

If I change my Google search settings to the country of France and language to ‘French’, I get the following result for the same query (‘Zara’):

Screen Shot 2019-02-28 at 9.39.46 AM

How using hreflang can boost your SEO

Using hreflang doesn’t necessarily help with ranking, but it ensures the right page gets served to the right people. This reduces your bounce rate because people are finding the page they want (and can read!) and aren’t clicking away quickly. A lower bounce rate is better for your site’s SEO.

At the end of the day, both you and Google have the same goal: you both want people to find the best possible landing page for a given keyword search (your page of course!). Knowing how to use hreflang in your HTML markup is an excellent step to get you there.

Get The Roaring PJ Blog in your Inbox!

This field is for validation purposes and should be left unchanged.
white-dots

Recent Posts

Robots Writing Content on Laptop Computers Generating AI Content

AI Generated Content: Privacy Perils and Ownership Rights

Seems like everyone, including writers, business owners and marketers, has jumped onto the AI generated content bandwagon. But before you throw in the whole ensemble, you need to learn about some concerns about privacy, content ownership and copyright. Being aware of these potential issues will help you make informed decisions about using AI generated content.…

rpj-home

Roaring Pajamas Rebrands Website: New Look, Same Quality Service

REDWOOD CITY, Calif. – July 11, 2023 – Roaring Pajamas, Northern California’s digital marketing solutions agency, is excited to share the launch of its redesigned and refreshed brand and website at https://www.roaringpajamas.com Anyone who has experienced a makeover knows how the process is transforming and rejuvenating. That’s exactly how employees and customers feel about the…

g-cookie

How to Remove Personal Information from Google Search Results To Protect Your Privacy

A new Google feature allows users to remove personal information from Google search results. All it takes is a little research and a few minutes to complete an online form.