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?

  • 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 Feb 6, 2014 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, 2014 at 23:18

2 Answers 2


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.

  • 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, 2014 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, 2014 at 16:12

Our solution to prevent links with query parameters from being indexed by Google, specifically for a WordPress site using the Yoast Plugin, seems effective. By enabling the "Remove unregistered URL parameters" option under the Advanced section of Yoast's URL cleanup, you're ensuring that any query strings getting indexed are redirected to the root domain or root page. This approach helps to streamline the indexing process and reduce the potential spamminess caused by indexing numerous URLs with different parameters.

It's a smart use of available tools within the WordPress ecosystem and demonstrates a good understanding of SEO best practices. This approach can be particularly helpful for sites that generate a lot of dynamic URLs, which can clutter search engine indices and potentially harm the site's SEO performance. Redirecting unregistered URL parameters simplifies the site's URL structure and improves the overall user experience, as well as search engine crawling efficiency.

enter image description here

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.