Nginx/robots.txt

来自OSSmedia

本页面介绍如何使用 Nginx 返回 robots.txt 的相关配置

阻止所有爬虫

location = /robots.txt {
  add_header  Content-Type  text/plain;
  return 200 "User-agent: *\nDisallow: /\n";
}