wordpress - 不理解这个 robots.txt
问题描述
另一家公司为我管理的网站设置了 robots.txt。这是他们使用的代码:
User-agent: googlebot
User-agent: google
User-agent: bingbot
User-agent: bing
Allow: /products/
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /xmlrpc.php
Disallow: /sales/
Disallow: /products/
Allow: /wp-content/uploads/
Allow: /wp-content/themes/
Allow: /wp-admin/admin-ajax.php*
我看到 Disallow: /products/ 并允许 /products/。我不明白他们为什么这样写。我应该改变什么吗?
解决方案
- 第一个指令
Allow: /products/
对 google 和 bing 机器人有效。 - 第二个指令,
Disallow: /products/
对所有其他机器人有效,“用户代理:*”。
我认为这些规则没有多大意义,但它们并不违反标准。
推荐阅读
- java - 无法创建新的 KafkaAdminClient
- excel - 如何在每一行上运行相同的宏,直到表格结束?
- jsoup - Jsoup 无法为我提取登录 html 内容
- flutter - 条码崩溃无错误
- python - OpenCV - 删除黑线粘在文本上
- r - Shinyapp.io 上带有嵌入图像的 Flexdashboard [R]
- api - 如何在 gunicorn 中生成 Flask App PER 用户
- javascript - Promise.all 打字稿不进行异步调用
- reactjs - 没有装饰器就无法让 mobx 持久工作。简单的例子
- spring - 如何获取多对多另一端的关联?