Blocking certain querystring parameters

Discussion in 'robots.txt' started by cDc, Jul 13, 2010.

  1. #1
    Hi There

    hope someone can help with this simple-ish request

    I would like to allow the page when it has just the "letter" parameter

    /script.aspx?letter=A

    I would like to block the page when it has letter plus any other params for example

    /script.aspx?letter=A&page=2
    /script.aspx?format=2&letter=B

    How can I define this in my robots.txt ?

    Thanks
     
    cDc, Jul 13, 2010 IP
  2. manish.chauhan

    manish.chauhan Well-Known Member

    Messages:
    1,682
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Use following code:

    User-agent: *
    Disallow: /script.aspx?letter=*&*
    Disallow: /script.aspx?*&letter=*

    This would block your pages as you wish. Please do let me know if you have any further query.
     
    manish.chauhan, Jul 13, 2010 IP
  3. cDc

    cDc Peon

    Messages:
    127
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks, worked perfectly
     
    cDc, Jul 15, 2010 IP
  4. manish.chauhan

    manish.chauhan Well-Known Member

    Messages:
    1,682
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Your welcome :)
     
    manish.chauhan, Jul 15, 2010 IP