I have A wildcard entries ( * and *.* ) For my domain pointing to my dev machine. Basically, any subdomain that is not www points to my dev machine (except the root).
I never want my dev machine to be indexed or "tracked" by search engines.
What I would like to do is simply configure the Rewrite global URL rule as follows:
<rule name="Global robots.txt rewrite" stopProcessing="true"> <match url="^robots\.txt" ignoreCase="true" /> <action type="Rewrite" url="http://localhost/robots.txt" /> </rule>
The rule above will not work; although the following redirection rule:
<rule name="GLobal robots.txt redirect" stopProcessing="true"> <match url="^robots\.txt" ignoreCase="true" /> <conditions> <add input="{HTTP_HOST}" pattern="^localhost$" negate="true" /> </conditions> <action type="Redirect" url="http://localhost/robots.txt" /> </rule>
.. but I'm not sure 301 redirects to robots.txt really work for search engines.
Any ideas on how to accomplish what I'm trying to do?
source share