Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Incorrect rel-alternate-hreflang implementation Google Webmaster Tools advised the following to us: We have noticed that on a number of the pages on your site the rel-alternate-hreflang

@Shakeerah822

Posted in: #Hreflang #Internationalization #Mobile #Sitemap

Google Webmaster Tools advised the following to us:


We have noticed that on a number of the pages on your site the
rel-alternate-hreflang implementation is incorrect. In particular,
there seems to be a problem with missing or incorrect bi-directional
linking (when page A links with hreflang to page B, there must be a
link back from B to A as well). When our algorithms detect conflicting
signals like on these pages, they may make indexing and ranking
decisions that do not match what you intended.


The links they mention in particular are:
www.kogan.com/au/careers/
You can see the sitemap for that particular URL at www.kogan.com/au/sitemap-pages.xml
In particular:

<url>
<loc>http://www.kogan.com/au/careers/</loc>
<changefreq>daily</changefreq>
<priority>0.5</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/careers/"/>
</url>


Or the URL www.kogan.com/au/shop/collection/mac-mini/, the sitemap for which can be found at www.kogan.com/au/sitemap-collections.xml
In particular:

<url>
<loc>http://www.kogan.com/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" media="only screen and (max-width: 640px)" href="https://m.kogan.com/#!/uk/shop/collection/mac-mini/"/>
</url>
<url>
<loc>https://m.kogan.com/#!/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="canonical" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
<xhtml:link rel="alternate" hreflang="en-AU" href="https://m.kogan.com/#!/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="https://m.kogan.com/#!/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="https://m.kogan.com/#!/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="https://m.kogan.com/#!/uk/shop/collection/mac-mini/"/>
<mobile:mobile/>
</url>


I'm not quite sure, based on reading of the spec, where I'm going wrong. Is it cause the mobile URL is not linking back to the desktop URLs? Or it cause the URL is being linked to the same URL for hreflang="en-AU"?

I'm aware of a similar question at Google Webmaster Tools incorrect rel-alternate-hreflang implementation warning message which hints at this being a bug on Google's side, though I'd love to get some confirmation or know if there is some blatant error with my implementation.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

Very few sites get this right, the complex permutations are very confusing.

It appears that you may have two different issues here:

1st Example (Careers):
You are indicating, using the rel=alternate reference, that there are other versions of that URL, when there is only one. You only need to self-reference when there are other alternates. This circular referencing could be causing the "bi-directional" (A->B, B->A) error.

A correction of the example code you gave would be:

<url>
<loc>http://www.kogan.com/au/careers/</loc>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>


2nd Example (Collections):
Mistake #1 : You're providing two alternate URLs to the mobile version for each URL (hashbang and non-hashbang versions), and then providing alternate language versions of those mobile URLs.

Mistake #2 : You're referencing mobile URLs in the <loc> elements your desktop XML sitemap - this is not needed as the rel=alternate media= takes care of this. You only need to provide mobile URLs in a mobile XML sitemap.

Mistake #3 : You were using <mobile:mobile> mark-up in your desktop XML sitemap, this should only be restricted to feature phone or smartphone XML sitemaps . It would be worth re-reading in detail the specifications (in the above link) again.

Mistake #4: The biggest issue is that you're not referencing the other versions in the <loc></loc> as their own entities - as per the spec, and as per the warning about 'bi-directional' annotation.

You should consider restricting the mobile alternate URL markup to the <head></head> of your documents. Remember that rel=canonical to the desktop URL is required to be included in the head of your mobile pages

A correction of your second example code would look like:

<url>
<loc>http://www.kogan.com/au/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/ii/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/nz/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>http://www.kogan.com/uk/shop/collection/mac-mini/</loc>
<xhtml:link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.kogan.com/uk/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-AU" href="http://www.kogan.com/au/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-US" href="http://www.kogan.com/ii/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-NZ" href="http://www.kogan.com/nz/shop/collection/mac-mini/"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="http://www.kogan.com/uk/shop/collection/mac-mini/"/>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>


You also need to be very careful in using rel=canonical in this situation (see answer to this post: plus.google.com/+RichardHearne/posts/SpSnNfv3f1a)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme