Reputation: 1601
I have a asp.net mvc5 application. I want to prevent search engines spider my site in .net mvc.
Is it enough to create robots.txt in my project (Guess it should not be in my solution) with the following code?
User-agent: *
Disallow: /
File structure
Solution
--Nuget
--CompanyProject
----Controllers
----Models
----Views
Upvotes: 0
Views: 1453
Reputation: 2399
Yes, and place in the root dir of your application.
Here some more info: https://support.microsoft.com/en-us/kb/217103
Upvotes: 3