Article 572CD Nginx correct settings for disabling robots

Nginx correct settings for disabling robots

by
newbie14
from LinuxQuestions.org on (#572CD)
Hi,
I have my daily logwatch which I view. In that I see logs on robots was logged in.
Below is the content of my robots.txt.

Quote:
User-agent: *
Disallow: /
Next here is my nginx.conf where I try to block this robots.

Quote:
location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
Or I also google some put deny all ? What is the most correct method to do this settings?latest?d=yIl2AUoC8zA latest?i=CkQzMeK9aaI:SFKtd7YMhag:F7zBnMy latest?i=CkQzMeK9aaI:SFKtd7YMhag:V_sGLiP latest?d=qj6IDK7rITs latest?i=CkQzMeK9aaI:SFKtd7YMhag:gIN9vFwCkQzMeK9aaI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments