i want to do something which a few ppl might find odd, but i want to stop all the robots to visit my page, but the googlebot for Adsense only. i think it is called mediapartners googlebot, but am not sure about what should be robots.txt file for that any help is appreciated. thanks
mediapartners-google <- thats the official name. Not sure what the command would be - need to read up on robots.txt commands
User-agent: Robot_Name Disallow: /dir/ replace Robot_Name with the exact bot name or use wildcard '*' for all. AFAIK there is no simple way to exclude all but one. You may need to create long list, for every robot except mediapartners-google. Find out what robots are visiting your sites from your server log and for each bot you want to block add like this: User-agent: Robot_Name Disallow: /
User-agent: * Disallow: / User-agent: mediapartners-google Disallow: The above should block all except mediapartners-google. But actually it fails and block all bots that obey robot.txt - including google! So it may not help your case. The one in my previous post is rather fool-proof.
your robots.txt should contain someting like this: First we match the mediapartners-google bot and disallows nothing. After we have matched the adsense bot we match any bot and disallows everything!
I think that helps us so google can not find which website are we using adsense easily and if there is any violation of terms you might get another chance to get out of it