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

I manage a mobile version of a desktop site. The mobile site has an mdot subdomain and is served from a different server. As part of recommended best practices by Google, I've included a link on the mobile site which allows the user to opt out of the mobile experience and view the desktop site instead.

In order to monitor the number of users who opt out I've appended a query parameter (?MobileOptOut=1) to the corresponding desktop link. To illustrate this: If a user on the mobile site visiting http://m.example.com/products/1127 clicks the opt out link he's taken to http://www.example.com/products/1127?MobileOptOut=1

Trouble is, Google is indexing the page with the ?MobileOptOut=1. Even more incredibly, this page actually ranks higher than the correct version without this parameter (http://www.example.com/products/1127)!

Is there any way I can tell Google's crawlers to ignore pages with this parameter - using Google's Webmaster Tools?

share|improve this question
1  
Why are you appending this? If your analytics is setup to monitor sub domains aswell just setup a goal from the mobile site to the main site either that or just monitor via the referring site –  Liam Sorsby Feb 6 at 22:48
    
That's a good question. One of the reasons is monitoring traffic but that parameter is also set for controlling redirect logic on the basis of a cookie. The value at the end sets the opt out cookie and sets a directive for Apache's mod_rewrite to either set or remove the session opt out. Getting rid of this parameter is not technically feasible for this reason –  Mukul Feb 6 at 23:18

2 Answers 2

up vote 3 down vote accepted

Google Webmaster Tools does have the ability to tell Googlebot to ignore parameters. You can tell Googlebot to ignore the parameter "MobileOptOut" anywhere it appears on your site.

To do so:

  1. Navigate in Webmaster Tools to Crawl -> URL Parameters.
  2. Click the Configure URL parameters » link.
  3. Click the Add Parameter button.
  4. Put in the name: "MobileOptOut".
  5. Select No: Doesn't affect page content (ex: tracks usage) from the drop down.
  6. Click the Save button.
share|improve this answer
    
Nice answer, only issue the OP would then need to deal with is other search engines –  Liam Sorsby Feb 7 at 1:34
    
this is exactly what I was looking for...Thanks! –  Mukul Feb 7 at 15:20

Stephen Ostermiller’s answer explains how to configure it in Google Webmaster Tools (which answers your question). If you care about other search engines, too, or in addition,

you could use the Canonical link type.

You could specify the canonical link in a HTTP header, or you could specify it in the HTML:

On http://www.example.com/products/1127?MobileOptOut=1 (*), add the following link element:

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

Now supporting search engines (or other consumers) know that the document containing this element has the canonical URL http://www.example.com/products/1127, and they may use this URL (instead of the current one, i.e. the one including the parameter) in their SERPs (or whatever the consumer does).

(*) You may also add the link element when the current page’s URL is already the canonical one.

share|improve this answer
    
This is a very useful bit of information. I'll check with our dev team whether the page served with the parameter is separate from the one without it. Thanks! –  Mukul Feb 7 at 15:22
    
@Mukull: No need for that. As I linked to in my answer, you may also use rel-canonical for the page without parameter (→ self-referential). –  unor Feb 7 at 16:12

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.