Forum Moderators: Robert Charlton & goodroi
I've read about the "nofollow" tag but will this work? I can't block access to the cart page as the whole site is in PHP.
What's the best way to deal with this and what type of code do I add to stop Gbot?
Thanks
Still, you are correct to keep these URL out of the index and out of the regular crawl. Is there some obvious pattern to your shopping cart URLs that you can block via robots.txt?
http://www.example.com/store.php?add_to_cart=1&discount_price=&discounted_qty=&discounted_qty_in_cart=
&prod_rn=1686µtime=0.21675700+1264280015&edit_item=&b_price=0.00
&option_0=0&option_1=0&option_2=0&option_3=&quantity=1
Wasn't sure if I could modify robots.txt or htaccess to block these URL's.
The biggest problem is g continues to checkout and then back out often carrying a session ID(only used during checkout). I also have a view cart section that has a link to the cart and the product so G is following those URLs as well. For cart purposes the product is listed with query strings in the checkout and view cart areas and G is indexing these.
The site has now uses SEO friendly URL's that are 301 redirects from query strings except when the checkout process is started.
Store.php is the base for every URL that is redirected.
My solution(I think) would just block G from starting to checkout and that would alleviate the rest of the problem. Not sure how to achieve this...
[edited by: tedster at 9:12 pm (utc) on Jan. 23, 2010]
[edit reason] line breaks added to prevent side scrolling [/edit]
User-agent: googlebot
Disallow: /*add_to_cart
You could also exclude indexing of any URL with the ad_to_cart parameter in Webmaster Tools.
Fear that other bots may or already doing the same thing. Would this code effectively block all?
User-agent: *
Disallow: /*add_to_cart
I detect whether the access is from a browser, SE or possible bad bot and display or remove forms or return blank pages accordingly, depending on the actual page or form. With shopping I display products without the order forms.
This is in ASP but it's at least as easy to do in PHP.
Reading your intitial post I get the impression your products are submitted to the cart through links rather than forms, is that so? If that is the case, very bad! If not, sorry I mentioned it. :)