【Multilingual SEO】What is Hreflang? How to set up on WordPress

Chibi

What is Hreflang?
How can I set it up on WordPress?

Chibi

Chibi

What are the good SEO tactics for Multilingual websites?

If you have those questions, I’m here to help you.

In this article, I’m going to show you the following topic;

  • What is Hreflang?
  • What if you don’t set it up?
  • How to set up Hreflang on WordPress
  • How to set it up on WordPress
  • The result after implementing

This is a niche topic that is useful for SEO experts managing multilingual websites or working in an international company.

Let’s dive in.

What is hreflang?

Hreflang specifies the language and optional geographic restrictions for a document. Hreflang is interpreted by search engines and can be used by webmasters to clarify the lingual and geographical targeting of a website.

Ref: hreflang | Wikipedia

Hreflang tag is to tell Google that which language the page is using.

Ref Hreflang Tag | MOZ
Ref Tell Google about localized versions of your page | Search Console Help
Ref Hreflang Attribute 101 | SEM Rush

What if you don’t set up hreflang?

Let’s see it on my Japanese and English blogs.

My blog’s title is “Heysho” so I want to show my blog on the top position on Google search result when users type “Heysho”.

I typed “Heysho” on google.com from USA, and the result was not good.

The search result from USA

The search result without hreflang

Ref The search engine result from the keyword “heysho” on google.com from USA

I see my Japanese blog on the 7th and English blog on 8th.

This is because my blog does not have hreflang tag and Google does not know if I want to show my English blog for English speakers.

Now I’m going to implement “hreflang tag” to rank up the English blog.

Heysho

Fyi, Search Latte allows you to see the search engine result pages from different locations.

How to set up hreflang

I am going to implement hreflang on the 2 pages below;

The process is to include the code below into <head>.

Japanese page
<link rel="alternate" href="https://heysho.com/en/how-to-grow-blog-quick/" hreflang="en" />
English page
<link rel="alternate" href="https://heysho.com/how-to-grow-blog-quick/" hreflang="ja" />

How to set up hreflang in WordPress: Use plugin “hreflang tags lite”

If you run a WordPress Blog, there is a good plugin called “hreflang tags lite” which can help you set up hreflang tags on each page quick.

Fyi, I looked for many similar plugins and this one was the best in my opinion.

Here is how to set it up;

Step1: Check “Post” and “Pages” from HREFLANG setting page after installing the plugin

How to set up hreflang in WordPress: Use plugin "hreflang tags lite"

Step2: Add URL and language from the other language article on each post

How to set up hreflang in WordPress: Use plugin "hreflang tags lite"

This is for article pages.

I was looking for the way to set up for homepage, but seems like I can’t make it with this plugin.

So I just added the Hreflang tags on child theme manually.

Step3: Add hreflang tags on homepage header manually

How to set up hreflang in WordPress: Use plugin "hreflang tags lite"

Move your header.php to your child-theme, and go to header.php to add this code;

Code
<?php if(is_home() && !is_paged()): ?> <link rel="alternate" href="The home page URL from other language" hreflang="The language code" /> <?php endif; ?>

Here is what I added on my English blog’s homepage.

Code
<?php if(is_home() && !is_paged()): ?> <link rel="alternate" href="https://heysho.com/" hreflang="ja" /> <?php endif; ?>

Result after adding Hreflang tags

After a few days, I saw my English blog came on 5th and Japanese blog on 6th.

Looks like it’s successful.

Ref Search Result of “heysho” | Google.com from USA

Message

Thanks for reading my article.

If you like the article, please share, leave your comment or subscribe.

I’d be happy to connect with you.

Heysho

Arigato

Leave a Reply

Your email address will not be published. Required fields are marked *