V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
rotciv
V2EX  ›  程序员

请教两个 robots.txt 相关的问题

  •  
  •   rotciv · 2021-06-01 16:35:09 +08:00 · 1255 次点击
    这是一个创建于 1031 天前的主题,其中的信息可能已经有所发展或是发生改变。
    robots.txt 内容:
    User-agent: *
    Disallow: /subject_search
    Disallow: /amazon_search
    Disallow: /search
    Disallow: /group/search
    Disallow: /event/search
    Disallow: /celebrities/search
    Disallow: /location/drama/search
    Disallow: /forum/
    Disallow: /new_subject
    Disallow: /service/iframe
    Disallow: /j/
    Disallow: /link2/
    Disallow: /recommend/
    Disallow: /doubanapp/card
    Disallow: /update/topic/
    Disallow: /share/
    Allow: /ads.txt
    Sitemap: https://www.douban.com/sitemap_index.xml
    Sitemap: https://www.douban.com/sitemap_updated_index.xml
    # Crawl-delay: 5

    User-agent: Wandoujia Spider
    Disallow: /

    User-agent: Mediapartners-Google
    Disallow: /subject_search
    Disallow: /amazon_search
    Disallow: /search
    Disallow: /group/search
    Disallow: /event/search
    Disallow: /celebrities/search
    Disallow: /location/drama/search
    Disallow: /j/

    1./group/topic 在标注为 Disallow 和 Allow 中都没有出现,那么应该默认为 Allow 还是 Disallow ?
    2."# Crawl-delay: 5"的单位是什么?
    4 条回复    2021-06-02 09:38:56 +08:00
    AoEiuV020
        2
    AoEiuV020  
       2021-06-01 17:00:07 +08:00   ❤️ 1
    如果有 Disallow: /的话是继承的,
    rotciv
        3
    rotciv  
    OP
       2021-06-01 17:17:48 +08:00
    @zengxs @AoEiuV020 谢谢
    marktask
        4
    marktask  
       2021-06-02 09:38:56 +08:00
    如果未定义任何蜘蛛,默认就是允许。例如 robots 为空,就是允许任何蜘蛛抓取任何目录
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5416 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:55 · PVG 14:55 · LAX 23:55 · JFK 02:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.