Help me design a simple robots file!

Discussion in 'robots.txt' started by Jon12345, Jan 8, 2007.

  1. #1
    Currently, I have the following robots.txt file:

    User-agent: *
    Disallow: /cart1.php

    This is in my root directory. All I want to do is restrict any robots from going to cart1.php or cart2.php.

    1. Does the above work ok for cart1.php?

    2. How do I modify it to cater for both cart1.php and cart2.php?

    Thanks,

    Jon
     
    Jon12345, Jan 8, 2007 IP
  2. ServerUnion

    ServerUnion Peon

    Messages:
    3,611
    Likes Received:
    296
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes, add additional Disallow lines to the code... Good luck
     
    ServerUnion, Jan 8, 2007 IP
  3. Jon12345

    Jon12345 Peon

    Messages:
    599
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for that!
     
    Jon12345, Jan 8, 2007 IP
  4. harsh

    harsh Peon

    Messages:
    213
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    add Disallow: /cart.php
     
    harsh, Jan 10, 2007 IP
  5. Jon12345

    Jon12345 Peon

    Messages:
    599
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why would you need to add cart.php when there is no cart.php?
     
    Jon12345, Jan 11, 2007 IP
  6. eTIME

    eTIME Banned

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    User-agent: *
    Disallow: /cart1.php
    Disallow: /cart2.php


    that's it
     
    eTIME, Jan 29, 2007 IP
  7. jonbt

    jonbt Peon

    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Or you can do this
    
    User-agent: *
    Disallow: /cart
    Disallow: /cart*
    
    Code (markup):
    and google won't go to any url that starts with /cart
     
    jonbt, Jan 30, 2007 IP