Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

http://domain/brand/brandname?orderby=rating&view=grid
http://domain/brand/brandname?orderby=price&view=list
http://domain/brand/brandname?orderby=date

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:

http://domain/brand/brandname?orderby=rating&view=grid
http://domain/brand/brandname?orderby=rating&view=list


to:

http://domain/brand/brandname

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

 
discard

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

Browse other questions tagged or ask your own question.