【问题标题】:How to assign specific sitemaps for specific crawler-bots in robots.txt?如何为 robots.txt 中的特定爬虫机器人分配特定站点地图?
【发布时间】:2014-09-18 08:51:08
【问题描述】:

由于一些爬虫不喜欢为 Google 制作的站点地图版本,因此我制作了不同的站点地图。

还有一个选项可以放

Sitemap: http://example.com/sitemap.xml

到 robots.txt。但是可以这样说吗:

User-agent: *
Sitemap: http://example.com/sitemap.xml

User-agent: googlebot
Sitemap: http://example.com/sitemap-for-google.xml

我找不到该主题的任何资源,而且我不想拿 robots.txt 开玩笑。

【问题讨论】:

  • 只是一个想法:使用例如 PHP 脚本基于用户代理提供不同的 robots.txt。

标签: sitemap robots.txt web-crawler


【解决方案1】:

这在 robots.txt 中是不可能的。 Sitemap: 值将由所有支持消费者使用。

Sitemaps.org protocol:

此指令独立于用户代理行,因此您将其放在文件中的哪个位置都没有关系。

Mentioned alternatives:将站点地图提交给搜索引擎via their websitevia HTTP requests

【讨论】:

    猜你喜欢
    • 2012-04-29
    • 2015-11-16
    • 2011-06-11
    • 2012-10-04
    • 2017-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多