Do the robots.txt but I also add an extra layer myself with this piece of php code for things:
Code:
$badAgents = array('Mediapartners-Google','msnbot-NewsBlogs/1.1 (+http://search.msn.com/msnbot.htm)','Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)','Mozilla/5.0 (compatible; Ask Jeeves/Teoma; +http://about.ask.com/en/docs/about/webmasters.shtml)','msnbot/2.0b (+http://search.msn.com/msnbot.htm)','Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)','msnbot/1.1 (+http://search.msn.com/msnbot.htm)', 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)');
if(in_array($_SERVER['HTTP_USER_AGENT'],$badAgents)) {
Header("Location: http://BLAH");
exit;
} That can just redirect the bots away from your site anyway.