Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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:

http://www.kogan.com/au/careers/

You can see the sitemap for that particular URL at http://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 http://www.kogan.com/au/shop/collection/mac-mini/, the sitemap for which can be found at http://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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted
+100

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: https://plus.google.com/+RichardHearne/posts/SpSnNfv3f1a)

share|improve this answer
1  
Another thing I see is that your m.kogan.com/au/shop/collection/mac-mini URLs have a meta-fragement specified on them, but don't respond with a rendered page under m.kogan.com/au/shop/collection/mac-mini/?_escaped_fragment_= ... I'd also add a rel=canonical from the mobile pages to the desktop ones. That said, there are a lot of things to work on here, so I'd recommend finding someone with whom you can double-check the implementation (who has done these things before), to move forward a bit faster. –  John Mueller Mar 4 at 22:16
    
Good pick-up @JohnMueller - I was hoping you would chime in on this :) –  Mike Hudson Mar 4 at 22:19
    
@MikeHudson Thanks! Really appreciate your help with this! I've fixed the /au/careers/ location to remove the self-referencing. With the collections map, I'll try and address your comments. Mistake#1: Fixed to include just non-hashbanged URLs (is there a preference which ones to use?) Mistake#2 + Mistake#3: Reason we're including Mobile URLs in the desktop sitemap is because m.kogan.com/robots.txt points the crawlers to this sitemap. Is this okay? Or should we completely separate the files? –  Gaurav Dadhania Mar 5 at 3:54
    
@MikeHudson Mistake#4 Not sure this is a mistake. There are bi-directional references, just in separate files. Eg: kogan.com/au/sitemap-collections.xml and kogan.com/nz/sitemap-collections.xml - Do they need to be in the same file? Also, with the mobile URLs, do they need their own rel="alternate" hreflang, so should pointing to the desktop using rel="canonical" and the desktop pointing to different hreflang URLs be fine? –  Gaurav Dadhania Mar 5 at 3:58
    
@JohnMueller Ah, noted! We removed the meta-fragment tag as it was not working. Thanks! –  Gaurav Dadhania Mar 5 at 3:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.