首页 > 解决方案 > 不理解这个 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/。我不明白他们为什么这样写。我应该改变什么吗?

标签: wordpressseorobots.txt

解决方案


  1. 第一个指令Allow: /products/对 google 和 bing 机器人有效。
  2. 第二个指令,Disallow: /products/对所有其他机器人有效,“用户代理:*”。

我认为这些规则没有多大意义,但它们并不违反标准。


推荐阅读