We’ve just began developing some mobile sites. It seems that at least one customer’s mobile site appears in the desktop search results for his keyword phrase and location. In fact, the m.domain.com shows up just above his desktop URL in the Google SERP.
These are not separate sites. We have a redirect code in place to direct mobile users to the mobile version of the site. I’ve never seen a m.domain in a desktop search … until now.
Is there some additional code I should be using to prevent this? Perhaps a ‘disallow’ in the robots.txt?
[font=verdana]What you need to do is to tell Google that one page is a mobile version of the other. Don’t block googlebot in robots.txt, because then it won’t find the mobile site at all, so won’t bring it up in mobile searches.
Thanks for the reply. However, I’m a bit confused about the mobile page vs. the desktop page. Since it’s the same site, there’s really only one page that’s displayed differently for each type of user. What am I missing here?
[font=verdana]The pages have different URLs, therefore they are different pages – eg, the URL for the desktop page is [noparse]www.example.com/page1[/noparse] and the URL for the mobile page is [noparse]m.example.com/page1[/noparse]. Where Google sees two different URLs, it assumes you have two different pages unless you tell it otherwise … and the mobile page probably has a much higher content:noise ratio, faster download times etc, meaning that it thinks the mobile page is a better bet (there’s a lesson in there somewhere). You may think it’s the same page, it may even be created from the same entry in the database, but when it shows up with a different URL, it’s a different page.
That’s why you put the alternate link on the ‘real’ page, to flag up that the other page is just the mobile version of it, and the canonical link on the ‘mobile’ page, to direct search bots back to the main page for non-mobile users.[/font]
Yes, every page that appears in both the desktop and mobile versions of the site needs this treatment. If you’re using any sort of decent CMS or PHP template then you should be able to get those lines added automatically.