Xtreme
Xtreme

Reputation: 1601

Prevent search engines spider my site in .net mvc?

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

Answers (1)

BhavO
BhavO

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

Related Questions