WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using WooCommerce on Wordpress to run a small online shop and Google is crawling loads of page variations such as:


As it stands there are more pages like this than products and it's likely that Google will consider some of them to be duplicate content.

I'm planning on using the Wordpress Redirection plugin to create some regexp rules so that I can redirect each of these variations to the main product page. In other words, redirect:




To do this I just need to split the URL at the whilst keeping the page part - I think ?. How do I do this ? I've searched around on the web but haven't found a specific example and I'm hopeless with regular expressions !

share|improve this question
if you redirect those pages, how will people then use the sort functions those URL parameters enable? anyway, those pages probably all have the same canonical link, so it's likely Google will not consider those duplicate content. – Milo Nov 1 '13 at 17:55
Using the redirect plugin it's possible to apply rules for specific user agents. I'm going to apply it only to Googlebot - normal users would be unaffected. Google may work out the canonical version of the url but it's still crawling 8 versions of the same page which is wasteful in terms of bandwidth. – Philip Lee Nov 1 '13 at 19:23
Actually, it's not 8 versions of the same url it's 23 versions according to the Wordpress Spider Tracker plugin. – Philip Lee Nov 1 '13 at 20:02
In my opinion, it would be better to manage this from the other end, via the URL parameters tool in Google's webmaster tools. – Milo Nov 1 '13 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.