V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
anUglyDog
V2EX  ›  问与答

请教关于搜索引擎 robots.txt 的设置

  •  
  •   anUglyDog · 2020-09-03 22:51:14 +08:00 · 745 次点击
    这是一个创建于 1338 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我参考了: https://developers.google.cn/search/reference/robots_txt?hl=zh-cn 知乎 robots.txt: https://www.jianshu.com/robots.txt 简书 robots.txt: https://www.zhihu.com/robots.txt

    User-agent: *
    Request-rate: 1/2 # load 1 page per 2 seconds
    Crawl-delay: 10
    Allow: /$
    Disallow: /
    Allow: /view/article/*
    

    我只需要爬虫爬取 /和 /view/article/下的内容,其它都不希望它爬取。这样设置有问题吗? (另外,知乎的 robots 文件真的啰嗦。。。)

    1 条回复    2020-09-04 01:12:13 +08:00
    anUglyDog
        1
    anUglyDog  
    OP
       2020-09-04 01:12:13 +08:00
    https://technicalseo.com/tools/robots-txt/
    我用这个工具查我现在设置的 robots.txt ,好像跟我预想的结果不一样。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2329 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 10:32 · PVG 18:32 · LAX 03:32 · JFK 06:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.