Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Robots.txt for different sites


Hi All,

I have a EPi server web application. The same web application is hosted under 3 domains.  Now my requirement is to have diffrenet Robots.txt for different domains. But since all the domains are pointing to sane folder I can have only file placed in that folder. Is there any workaround for placing seperate Robots.txt file under each domain.


Thanks in Advance.

Oct 03, 2009 11:03

You can create 3 files:




and then define your own handler, assign it to robots.txt in web.config

<add verb="*" path="robots.txt" type="Project.RobotsHandler"/>

and inside the handler check Request.Url.DnsSafeHost and return the content of one of the files.  If you use IIS7 you define handlers in section

<add name="robots" path="robots.txt" verb="*" type="Project.RobotsHandler, Project" />

Oct 03, 2009 11:14

Thanks for your reply.

Can you point me to any URL that explains the code to be written in the Handler.

Oct 03, 2009 11:39
Oct 03, 2009 12:11

Thanks Maras. Below link is also usefull 

Thanks for your suggestion.


Oct 03, 2009 12:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.