Robots.txt Protocol Allows Some Wildcards in Disallow Command
August 10, 2010 – 12:13 amRobots.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: /*?$


4 Responses to “Robots.txt Protocol Allows Some Wildcards in Disallow Command”
Thanks for the tips.
By SEO on Aug 15, 2010
We are glad you liked it. Keep checking for more useful tips.
By RedAlkemi on Oct 20, 2010
hey really thanks for sharing this nice post..
I will bookmark it ..
By Alumina Ceramics on Jul 5, 2011
Yeh sure. Keep visiting for regular updates…
By RedAlkemi on Jul 11, 2011