Monday, December 19, 2016

How to Add Hreflang Language Tag in Blogger Blog

Have you came across above error in Google Search Console while tracking your site's search performance?

The error clearly states that "Your site has no hreflang tags. Google uses hreflang tags to match the user's language preference to the right variation of your pages."

If you have no idea about hreflang tag. Don't worry, we would give a brief introduction here and then tell you how to add it in your blog.

The hreflang tag (also referred to as rel="alternate" hreflang="x") tells Google and other search engines about the language of our blog or website. Based on the hreflang tag, Google and other search engines serve the correct language or regional URL in Search results.

For more details on hreflang tag, like what is it, when should we use it, what’s the SEO benefit of using this tag, you could refer my another article here.

Let's directly jump to our core topic of discussion today. 😊

Adding hreflang tag in our Blogger is very simple and easy. Just follow the below steps:
  1. Add the HTML link element containing hreflang attribute in the header section (i.e below <head> tag) of your blog/website's template editor. For example,

    Targeting English speakers 
    <link rel="alternate" href="" hreflang="en" />
      Targeting English speakers in Ireland
    <link rel="alternate" href="" hreflang="en-ie" />
    • The href attribute refer to the URL of our blog. Therefore just replace "" with the URL of your blog 
    • The hreflang attribute value refers to the language and optionally the region of our alternate URL. We should keep in mind that specifying the region alone is not valid. We could either specify the language tag or combination of language and region code separated by hyphen(-).  For configuring this follow the step 2 
  2. Configuring the language & region values
    Depending upon your websites that targets users from different country and/or different regions, you could set the hreflang attribute value. You could find the different language tags and region code from below links: (language in ISO 639-1 format) (region in ISO 3166-1 Alpha 2 format)

    Let's see some examples to understand it better.
    • en: English content, independent of region (valid)
    • en-ie: English content, for Ireland region (valid)
    • ie: for Ireland region (invalid, as only specified the region )
That's it. You have done it. If you have any suggestion or any query then don't forget to put your comments in the comment box. Happy Learning !

Reference links:


  1. Hi there, I have a doubt in my blog i have put robots.txt and blocked /search to be indexed but when i checked my website most of my labels come through /search only

    for example:
    my website
    if i need to go to samsung url will be like this

    so in order for my label to get indexed do i need to remove /search from robots.txt? I have read that google doesn't want to include /search pages in their index. Help me here.

    1. Thank you for your question. You have taken the right step by disallowing the /search in the robot.txt because what ever things that are returned as a result of searches are not your actual content[eg. /search/label/Samsung]. You always want your actual post to be indexed by search engines which could be easily done by submitting you sitemap.xml.

      Think for a moment, suppose your actual content[posts] & label searches[search results], both gets indexed then what would happen?
      - It would be treated as the duplicate content by the search engines.
      - It might attract the duplicate content penalty.
      Now, ask yourself, do you really want your search results to get indexed by search engines. Hoping that, you got your answer. :-)

  2. Thank U So Much

  3. Informative article
    I was searching for this information on google