Hearing about the problems with mobile browser detection I plan to add a button to my site which enables the users to switch manually between normal/mobile version of the site. The button sets a cookie and reloads the page and the PHP code on the server side seeing the cookie serves exactly the same page with only the CSS link pointing to the mobile stylesheet file.

I heard Google is able to follow javascript code too, so it may "push" the button and sees the mobile version of the site. Wouldn't it confuse Google that it sees exactly the same page (same URL, same content) with only a the CSS link replaced? Wouldn't it consider it duplicate content?

  • 3
    If the URL is the same, then I don't see how it can be considered duplicate content. One url == one page of content.
    – MrWhite
    Commented Feb 17, 2012 at 15:42
  • Yes, but it is not exactly the same page, beacuse the <link rel="stylesheet" ...> line includes a different style sheet depending on the cookie, so the HTML text differs in this line. The questions is: does Google know it is actually the same page if it differs in the CSS linking line? Won't Google think I'm doing some trick if I somtimes serve a different page for the same URL?
    – Tom
    Commented Feb 17, 2012 at 15:49
  • I think it's more likely that google either will detect the mobile stylesheet and ignore it (iffy) or won't pay attention to the difference and may display different content at random in it's search results, some mobile, some desktop. Google bot isn't really that smart. Luckily, I don't think that duplicate content within the same domain is a big strike against you. Same content, different domains: problem. Same content, same domain, little to no power lost. So you just need to worry a bout not showing googlebot the mobile content.
    – Kzqai
    Commented Feb 17, 2012 at 16:33

1 Answer 1


Unfortunately, having the same content on a mobile page would be considered a duplicate. This is among the few legitimate sources of inevitable content duplication, along with syndicated content and news/blog homepages.

But if you just have a single URL for each page and simply switching the CSS based on cookies, then there's really only one page. This is also one of the advantages of responsive design and media queries. If your mobile and main site have the exact same content, then there's really no need to have 2 separate sites/pages.

However, in many cases, mobile and non-mobile users aren't looking for the exact same content/services. This would be the reason for building a separate mobile portal. You may still have some overlap in content, but such content can be presented slightly differently from the main site, e.g. abridged/summarized, in different groupings/contexts, with additional info, etc.

Otherwise, you could simply link the two versions using a rel="alternate" tag:

<link rel="alternate" media="handheld" href="...">

I don't think Google has come out and stated that they judge alternate links differently for content duplication, but it's a logical behavior. If they don't yet take alternates into account when considering duplications, then they eventually will. I've always been a strong believer in pro-active SEO that aims for where search engines will be in the future rather than limiting my SEO efforts to just the current ranking factors. By doing what's logical and best for UX rather than always waiting for the search engines to implement a factor before you start taking it into account, you can stay ahead of the game instead of constantly playing catch-up to the search engines.

Alternatively, if you want to make some main site content available through the mobile site as well, but it's not really part of the core mobile UX and is simply included for completeness, you could give it a canonical link to the non-mobile version. This will prevent it from showing up in search results, but that's OK since it's content that users would be unlikely to search for on mobile devices.

The last approach that many seem to advocate is to do some benign cloaking by always redirecting search engine crawlers to the non-mobile URL. I'm not a big fan of this, as it's a rather kludgy solution IMO.

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.