I have created a mobile version for each page of my website and I also try to detect mobiles from the Agent string. But for cases that I fail to properly detect a mobile, the user can force the mobile version by adding a get parameter (like ?mobile=1).

I checked the behavior of google by checking it with an old mobile. Of course google knew that it was a mobile and displayed the mobile version of its page. But the url that it used to redirect to my website was without the get parameter(?mobile=1) so it went to the standard version (And my website did not detect the user as mobile, then displayed the standard version.)

How can I solve this problem? I found nothing in Webmasters Tools to notify google of mobile version parameter.

In Short, I want to see if google can halp me to detect mobile phones by displaying the url of the mobile version of the page in its search results (for the visitors who it detects as mobile)?

Thank you very much


I have used this tag in each page to indicate that the mobile version and standard one are the same. Is it right to do so? Does this tag prevents google to display mobile version urls in search results?

<link rel="canonical" href="Standard/Version/of/URL">

1 Answer 1


Instead of using just the canonical tag on both pages, use the annotations for desktop and mobile URLs.

On the desktop page, add:

<link rel="alternate" media="only screen and (max-width: 640px)"
  href="http://example.com/?mobile=1" >

and on the mobile page, add the canonical tag:

<link rel="canonical" href="http://www.example.com/" >

These tags can also be defined in sitemaps rather than in the source code and are set on a apeg level, not a site level.

More info here Building Smartphone-Optimized Website

  • Thanks Max. I read the linked articles. In fact I have already implemented all 3 methods for building mobile version. So I added Header append Vary User-Agent to .htaccess to prevent loading of wrong cached pages by caching servers. and then added the link you mentioned to each standard version. I just changed 640px to 550px because I think 640px is too wide to be regarded as a mobile screen. I also modified the sitemap and included mobile urls with xhtml:link tag. Hope All these are not too confusing for google to get a proper response from them! Thank you again
    – Ormoz
    Commented Oct 17, 2014 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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