Block Querystring for all user-agents

Discussion in 'robots.txt' started by Planet_x, Aug 2, 2011.

  1. #1
    I am slightly confused on the syntax to block a specific query string. I need to block all query strings that have ?PF=T and ?InquiryID=

    My robots.txt has at the top User-agent: * for all agents. But I am unsure about the syntax for these 2 strings,Is it like

    Disallow: /*?PF=T
    Disallow: /*?InquiryID=*

    Or since they are already under the user agent for all agents do I remove the /* from each and just put

    Disallow: ?PF=T

    Disallow: ?InquiryID=*

    appreciate any advice, thanks.
     
    Planet_x, Aug 2, 2011 IP
  2. manish.chauhan

    manish.chauhan Well-Known Member

    Messages:
    1,682
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Your first instructions are correct. These block all the urls that contains either ?PF=T or ?InquiryID= anywhere in the urls.
     
    manish.chauhan, Aug 5, 2011 IP