robots.txt Rerouting on Development Servers
Every website should have a robots.txt file. Some bots hit sites so often that they slow down performance, other bots simply aren't desirable. robots.txt files can also be used to communicate sitemap location and limit request rate. It's important that the correct robots.txt file is served on development servers though, and that file is usually much different than your production robots.txt file. Here's a quick .htaccess snippet you can use to make that happen:
RewriteCond %{HTTP_HOST} devdomain RewriteRule ^robots.txt$ robots-go-away.txt [L]
The robots-go-away.txt
file most likely directs robots not to index anything, unless you want your dev server to be indexed for some reason (hint: you really don't want this).
Here’s an example showing how to include multiple development domains:
use vagrant