deny all robots except google,yahoo etc.

hi guys,

i want to deny all robots web crawler except google,yahoo, etc.

this sample robot.txt is true ?


User-agent: *

disallow:/

User-agent: Googlebot

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-agent: googlebot-image

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-agent: googlebot-mobile

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-agent: MSNBot

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-agent: yahoobot

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-agent: yahoo-blogs/v3.9

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/

User-Agent: bingbot

Disallow: /galleries/

Disallow: /assets/

Disallow: /protected/

Disallow: /images/

Disallow: /template/

Disallow: /themes/

Disallow: /language/

Disallow: /libraries/

Disallow: /media/

Disallow: /modules/

Disallow: /plugins/

Disallow: /templates/

Disallow: /tmp/

Disallow: /xmlrpc/




I always put the “all bots” section as last , if it’s at the top some bot could stop right there at the first line without seeing everything after that.Also, you can group all those bots you want to allow to be like




User-agent: Googlebot

User-agent: googlebot-image

User-agent: googlebot-mobile

User-agent: Mediapartners-Google*

User-agent: <any other bot you want to allow>

Disallow: 




User-agent: *

Disallow: /

And you probably already know that but just to mention, this works only for "polite" bots… so there still can be some bots that will scan your site regardless of the robots.txt file.

thanks [size=2]Maurizio Domba Cerin . [/size]

is it true ?

http://www.robotstxt.org/faq/blockjustbad.html

Yes it is, that’s why I mentioned above “polite” bots.

is there an other solution to block bad robots ?

Just google a bit there are a lot of information there, here is one article to start with - http://www.blogtips.org/web-crawlers-love-the-good-but-kill-the-bad-and-the-ugly/