发现搜索引擎收录了不少带get参数的网页,造成了很多重复页面被收录。我们可以手动建立一个robots.txt来阻止搜索引擎收录不相关的地址。

例如:
https://www.ipaddr.host/simsimi-qq-robot.html?replytocom=298
https://www.ipaddr.host/simsimi-qq-robot.html/comment-page-1?replytocom=23

标红的部分是多出来的。
导致与https://www.ipaddr.host/simsimi-qq-robot.html成为重复的页面。

下面是我使用的robots.txt文件。
也可以点击这里查看本站的robots.txt。

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /*?*
Disallow: /*comment-page*