robots.txt

小灰灰 2022-06-07 13:10 247阅读 0赞

Rails 中的 robots.txt

  1. # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
  2. #
  3. # To ban all spiders from the entire site uncomment the next two lines:
  4. # User-agent: *
  5. # Disallow: /
  6. User-agent:* ”表示本节适用于所有机器人。“ Disallow:/ ”告诉机器人它不应该访问网站上的任何页面。
  7. 使用/robots.txt时有两个重要的注意事项:
  8. 机器人可以忽略您的/robots.txt。特别是扫描Web的恶意软件机器人的安全漏洞,以及垃圾邮件发送者使用的电子邮件地址收集器将不会引起注意。
  9. /robots.txt文件是公开可用的文件。任何人都可以看到您的服务器的哪些部分不希望机器人使用。
  10. # https://www.taobao.com/robots.txt 页面
  11. User-agent: Baiduspider
  12. Allow: /article
  13. Allow: /oshtml
  14. Allow: /wenzhang
  15. Disallow: /product/
  16. Disallow: /
  17. User-Agent: Googlebot
  18. Allow: /article
  19. Allow: /oshtml
  20. Allow: /product
  21. Allow: /spu
  22. Allow: /dianpu
  23. Allow: /wenzhang
  24. Allow: /oversea
  25. Allow: /list
  26. Disallow: /
  27. User-agent: Bingbot
  28. Allow: /article
  29. Allow: /oshtml
  30. Allow: /product
  31. Allow: /spu
  32. Allow: /dianpu
  33. Allow: /wenzhang
  34. Allow: /oversea
  35. Allow: /list
  36. Disallow: /
  37. User-Agent: 360Spider
  38. Allow: /article
  39. Allow: /oshtml
  40. Allow: /wenzhang
  41. Disallow: /
  42. User-Agent: Yisouspider
  43. Allow: /article
  44. Allow: /oshtml
  45. Allow: /wenzhang
  46. Disallow: /
  47. User-Agent: Sogouspider
  48. Allow: /article
  49. Allow: /oshtml
  50. Allow: /product
  51. Allow: /wenzhang
  52. Disallow: /
  53. User-Agent: Yahoo! Slurp
  54. Allow: /product
  55. Allow: /spu
  56. Allow: /dianpu
  57. Allow: /wenzhang
  58. Allow: /oversea
  59. Allow: /list
  60. Disallow: /
  61. User-Agent: *
  62. Disallow: /

发表评论

表情:
评论列表 (有 0 条评论,247人围观)

还没有评论,来说两句吧...

相关阅读