Friend of mine asked me about this today and I had to look it up because its been a while since I have done anything with robots.txt. Turns out its not as easy as just adding the robots.txt file to the web server root. SharePoint likes to block access to the file, so you will need to add a managed path from Central Admin.
Here are the steps:
- Open Central Admin and navigate to Application Management > Define Managed Paths
- Select your specific web application from the drop down
- Add a new path for /robots.txt
- Switch the type to Explicit inclusion
- Click OK
- Run IISREST
This is all you need to do, but if you still get a permissions problem, right-click on robots.txt and give “Everyone” Read permissions to the file.