网站根目录下设置的 robots.txt 规则现在爬虫机器人不遵守了嘛 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
keer
V2EX    程序员

网站根目录下设置的 robots.txt 规则现在爬虫机器人不遵守了嘛

 
  •   keer 17 小时 47 分钟前 2775 次点击

    网站根目录下设置的 robots.txt 规则貌似对 gptbot 和 facebook 的 crawler 不生效啊

    User-agent: * Disallow: / User-agent: GPTBot Disallow: / User-agent: ChatGPT-User Disallow: / 

    设置 robots.txt 的时间已经超过了 30 个小时。都不遵守 robots 的话,只能从 nginx 配置了。

    10M 的宽带直接被爬虫跑满了 1760664351584.png

    20.171.207.130 - - [17/Oct/2025:09:16:41 +0800] "GET /?s=search/index/cid/323/bid/24/scid/85C4/peid/27/ov/new-asc.html HTTP/1.1" 200 38211 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 117.50.153.198 - - [17/Oct/2025:09:16:42 +0800] "GET /?s=search/index/cid/316/scid/85C4/poid/33/bid/8/ov/new-asc/peid/7.html HTTP/1.1" 200 38340 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" 57.141.0.25 - - [17/Oct/2025:09:16:42 +0800] "GET /?s=search/index/poid/33/scid/9EBB198E982B/cid/444/peid/17/bid/12.html HTTP/1.1" 200 637932 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)" 57.141.0.12 - - [17/Oct/2025:09:16:42 +0800] "GET /?s=search/index/poid/33/scid/9EBB198E982B/cid/631/peid/29/bid/28/ov/price-asc.html HTTP/1.1" 200 637644 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)" 57.141.0.74 - - [17/Oct/2025:09:16:42 +0800] "GET /?s=search/index/poid/33/scid/C4/cid/608/peid/7/ov/new-asc.html HTTP/1.1" 200 635769 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)" 57.141.0.63 - - [17/Oct/2025:09:16:42 +0800] "GET /?s=search/index/poid/33/peid/29/bid/24/scid/C4/cid/570/ov/access-desc.html HTTP/1.1" 200 618851 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)" 117.50.153.198 - - [17/Oct/2025:09:16:43 +0800] "GET /?s=search/index/cid/321/bid/29/scid/85C4/ov/new-desc/peid/7/poid/33.html HTTP/1.1" 200 38368 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0" 57.141.0.34 - - [17/Oct/2025:09:16:43 +0800] "GET /?s=search/index/poid/33/peid/18/ov/new-desc/scid/9EBB198E982B/bid/8/cid/367.html HTTP/1.1" 200 467003 "-" "meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)" 
    第 1 条附言    13 小时 8 分钟前
    nginx 层面直接 return 403;

    清净了
    25 条回复    2025-10-17 18:12:55 +08:00
    Configuration
        1
    Configuration  
       17 小时 43 分钟前
    1 这是君子协定
    2 UA 可以伪造
    keer
        2
    keer  
    OP
       17 小时 40 分钟前
    @Configuration 这样来看,他们是一点也不君子了呀
    SuperGeorge
        3
    SuperGeorge  
       17 小时 38 分钟前
    点名 YisouSpider ,robots.txt 毫无作用,UA + IP 段都拉黑后还是疯狂爬,403 状态码告警就没停过。
    iugo
        4
    iugo  
       17 小时 33 分钟前
    参考: https://developers.facebook.com/docs/sharing/webmasters/web-crawlers/

    1. UA 是 `meta-externalagent`
    2. 判断一下 IP 是否是 Meta 声明的爬虫 IP

    OpenAI 的爬虫, 不予置评.
    1up
        5
    1up  
       17 小时 31 分钟前
    一直不遵守啊
    Goooooos
        6
    Goooooos  
       17 小时 30 分钟前
    现在 AI 的爬虫都不当自己是爬虫,完全乱来
    liuidetmks
        7
    liuidetmks  
       17 小时 23 分钟前   1
    识别到是 AI 爬虫,能不能随机输出 乱序假文 ?

    搜索引擎还能反哺网站流量,AI 就是纯喝血了
    bgm004
        8
    bgm004  
       17 小时 13 分钟前
    ai 的爬虫就和当年的迅雷一样。
    picone
        9
    picone  
       17 小时 9 分钟前
    我也发现了,直接根据 UA 返回 403 了,真的乱来
    laobaiguolai
        10
    laobaiguolai  
       17 小时 3 分钟前
    用的 cloudflare ,他们家的识别和阻止能力还是可以的
    opengps
        11
    opengps  
       17 小时 3 分钟前   1
    我最近刚好做了相关的,搜索引擎的爬虫,至少人家 UA 是明确的,虽然可以轻松伪造,但如果你不想,可以从 UA 入手拦截官方的爬虫。(按伦理来讲,至少官方的爬虫不至于明目张胆伪造 UA )。
    顺便附赠几个最近关注到的 主要的 AI 爬虫 UA 关键字:"mj12bot","openai","gptbot","claudebot","semrushbot","siteauditbot"
    charles0
        12
    charles0  
       16 小时 37 分钟前   1
    还有伪装 UA 的爬虫呢,要解决可以试试 Cloudflare 或 https://anubis.techaro.lol/
    ZeroClover
        13
    ZeroClover  
       15 小时 26 分钟前   1
    你发的日志里面 GPTBot 都是假的,和官方公布的 IP 对不上

    https://platform.openai.com/docs/bots
    edak
        14
    edak  
       15 小时 4 分钟前
    君子协议
    Ketteiron
        15
    Ketteiron  
       14 小时 53 分钟前
    有挂 waf 吗,现在一个小网站/博客都没几个活人看,却被几百个 bot 轮番轰炸
    shinciao
        16
    shinciao  
       14 小时 4 分钟前
    现在 AI 的爬虫会访问除了 robots.txt 之外的所有文件
    keer
        17
    keer  
    OP
       13 小时 7 分钟前
    @iugo
    @picone

    直接一刀切了
    keer
        18
    keer  
    OP
       13 小时 6 分钟前
    @Ketteiron 就是个企业站。 平时确实没啥人,上个月跑了 1.5T 的流量,这个月已经跑了 1T 了。

    还好有流量包。
    keer
        19
    keer  
    OP
       13 小时 4 分钟前
    @ZeroClover 确实可能被伪造的 UA 。 我现在直通过 UA 给禁了。 算是一刀切了
    ChicC
        20
    ChicC  
       12 小时 39 分钟前
    点名 GPT,网站刚上线就被猛猛爬
    macaodoll
        21
    macaodoll  
       9 小时 47 分钟前
    ==“我就蹭蹭不进去”
    Gilfoyle26
        22
    Gilfoyle26  
       9 小时 43 分钟前
    遵守???哈哈哈,互联网没有遵守这一说
    W4J1e
        23
    W4J1e  
       9 小时 41 分钟前
    除了有良心的搜索引擎,那些恶意爬虫甚至伪造 UA 的谁遵守过?返回 403 个人感觉不如返回 444
    unused
        24
    unused  
       9 小时 38 分钟前
    现在很多网站在用 anubis
    https://github.com/TecharoHQ/anubis
    hefish
        25
    hefish  
       8 小时 57 分钟前
    谁遵守谁是傻子,凭本事爬到的东西,你管我。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     981 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 21ms UTC 19:10 PVG 03:10 LAX 12:10 JFK 15:10
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86