Robots.txt Protocol Allows Some Wildcards in Disallow Command

August 10, 2010 – 12:13 am

Robots.txt protocol also supports some wildcard characters in Disallow (or allow) command which can be used for certain form of pattern matching. A asterisk sign (*) is used to specify any number of characters whereas a dollar sign ($) is used to mark the end of any filename. For e.g.


To block folders starting with word private:

        User-agent: Googlebot
        Disallow: /private*/

To block dynamic URLs with question marks in them:

        User-agent: Googlebot
        Disallow: /*?

To block all .pdf files:

        User-agent: *
        Disallow: /*.pdf$

If a ? indicates a session ID, but there are other URLs which end with ? which you  want to index:

        User-agent: *
        Disallow: /*?
        Allow: /*?$
  1. 4 Responses to “Robots.txt Protocol Allows Some Wildcards in Disallow Command”

  2. Thanks for the tips.

    By SEO on Aug 15, 2010

  3. We are glad you liked it. Keep checking for more useful tips.

    By RedAlkemi on Oct 20, 2010

  4. hey really thanks for sharing this nice post..
    I will bookmark it ..

    By Alumina Ceramics on Jul 5, 2011

  5. Yeh sure. Keep visiting for regular updates…

    By RedAlkemi on Jul 11, 2011

Post a Comment

*Please fill correct value in the text box given below.