SEO Checklist 2021 - Hreflang conflicts within page source code

To understand what does the issue "Hreflang conflicts within page source code " means first you need to understand what is "Hreflang" tag and what does it do.

Hreflang Tag

What are hreflang tag attributes?
The hreflang attribute (also referred to as rel="alternate" hreflang="x") tells Google which language you are using on a specific page, so the search engine can serve that result to users searching in that language.

Code Sample
<link rel="alternate" href="http://example.com" hreflang="en-us" />

ABOUT THIS ISSUE: Hreflang conflicts within page source code 

If you're running a multilingual website, it is necessary to help users from other countries find your content in the language that is most appropriate for them. This is where the hreflang (rel="alternate" hreflang="x") attribute comes in handy. 

This attribute helps search engines understand which page should be shown to visitors based on their location. It is very important to properly synchronize your hreflang attributes within your page's source code, otherwise, you may experience unexpected search engine behavior. For more information, see this article.

Category: Indexability Issue

HOW TO FIX IT

To avoid any conflicts it is recommended that you review your hreflang attributes within your page's source code and fix any of the following issues:
- Conflicting hreflang and rel=canonical URLs
- Conflicting hreflang URLs
- No self-referencing hreflang URLs

Let us explore more with this live example:-


In the above example, we see that SEMrush Site Audit has detected 2 issues related to the "Hreflang conflicts within page source code" issue.

The first one says:- Conflicting hreflang and rel=canonical 

This means:- The canonical tag on this page points to a different language URL. 
The language specified is Spanish (hreflang="es") but the URL pointed to (href="http://www.apprentices.in/") is in English.

See the screenshot of the page source view


When using canonical tags on your website along with hreflang attributes, you should make sure to specify a self-referential canonical tag.

The second one says:- No self-referencing hreflang

This means:- If your page doesn’t contain a self-referencing hreflang in its set of hreflang attributes, those attributes may be ignored or interpreted incorrectly.
The best thing to do is to include this page’s URL and language code in your set of hreflang attributes.

Code Sample
<link rel="alternate" hreflang="en" href="http://www.apprentices.in/" />

Read more on hreflang tag



Comments

Popular posts from this blog

Marketing is nothing but Meeting Needs Profitably