An Umbraco package that serves a different robots.txt for each domain.
Install the Umbraco package at: https://our.umbraco.org/projects/developer-tools/robotnik
Once installed, just add a few text files and add some app settings to your web.config to map them to domains. For example:
<appSettings>
<!-- http://staging.somesite.com/robots.txt -->
<add key="robotnik-staging.somesite.com" value="~/robots-staging.txt" />
<!-- http://www.somesite.com/robots.txt -->
<add key="robotnik-www.somesite.com" value="~/robots-production.txt" />
<!-- You can use this to specify a default to avoid a 404. -->
<add key="robotnik-default" value="~/robots-staging.txt" />
</appSettings>
Here are the code conventions when contributing to this repository:
- Spaces instead of tabs.
- Lots of code comments (properties, methods, classes).
- Follow existing standards you see in each file.