yy日韩无码,富婆的诱惑,国产菊爆视频在线观看,国产精品无码AV高清波波AV,国产成人啪精品视频站午夜,已满十八岁免费观看电视剧十八岁,中文字幕av久久人妻蜜桃臀

LOGO
外貿(mào)網(wǎng)站建設(shè),讓業(yè)務(wù)全球可達(dá)
0%
新聞中心 網(wǎng)絡(luò)推廣 網(wǎng)站建設(shè) 服務(wù)器相關(guān) 優(yōu)化推廣 首頁(yè)>新聞>服務(wù)器相關(guān)

屏蔽AI抓取,防止流量大增導(dǎo)致服務(wù)器卡頓

時(shí)間:2026-04-19   訪問(wèn)量:0

第一步:robots.txt 配置

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: anthropic-ai
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: CCBot
Disallow: /

這表示:

  • GPTBot(OpenAI)禁止訪問(wèn)

  • ClaudeBot(Anthropic)禁止訪問(wèn)

  • anthropic-ai(Claude 的另一個(gè) UA)禁止訪問(wèn)

  • Google-Extended(Google AI 數(shù)據(jù)抓?。┙乖L問(wèn)

  • CCBot(Common Crawl)禁止訪問(wèn)

所有這些都是合法的 AI 爬蟲(chóng),它們都會(huì)遵守 robots.txt。

屏蔽AI抓取,防止流量大增導(dǎo)致服務(wù)器卡頓


2:NGINX中屏幕:把 UA 屏蔽規(guī)則放到 server{} 頂層

# 屏蔽 AI 爬蟲(chóng)
if ($http_user_agent ~* (GPTBot|ClaudeBot|anthropic-ai|Google-Extended|CCBot)) {
    return 403;
}

# 屏蔽常見(jiàn)爬蟲(chóng)
if ($http_user_agent ~* (Scrapy|curl|wget|python-requests|libwww-perl|HTTrack|HttpClient|Go-http-client|axios|node-fetch)) {
    return 403;
}

屏蔽AI抓取,防止流量大增導(dǎo)致服務(wù)器卡頓



如果你需要加強(qiáng)版本:

# ============================
# 1. IP 限速# 限制每個(gè) IP 的請(qǐng)求速率(每秒 5 次),# 限制每個(gè) IP 的并發(fā)連接數(shù)(最多 20 個(gè))
# ============================
limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=5r/s;
limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;

# ============================
# 2. 防 CC# 防止同一 IP 在 1 秒內(nèi)請(qǐng)求同一 URL 超過(guò) 3 次
# ============================
limit_req_zone $binary_remote_addr$uri zone=cc_limit:10m rate=3r/s;

server {

    # AI 爬蟲(chóng)屏蔽
    if ($http_user_agent ~* (GPTBot|ClaudeBot|anthropic-ai|Google-Extended|CCBot|Applebot)) {
        return 403;
    }

    # 惡意爬蟲(chóng)屏蔽
    if ($http_user_agent ~* (curl|wget|python|python-requests|Scrapy|spider|crawler|libwww-perl|HTTrack|HttpClient|Go-http-client|axios|node-fetch|Java|okhttp|php|ruby|perl)) {
        return 403;
    }

    # 非瀏覽器 UA 屏蔽
    if ($http_user_agent = "") { return 403; }
    if ($http_user_agent !~* "(Mozilla|Chrome|Safari|Firefox|Edge)") { return 403; }

    # IP 限速
    limit_req zone=req_limit_per_ip burst=10 nodelay;
    limit_conn conn_limit_per_ip 20;

    # 防 CC
    limit_req zone=cc_limit burst=5 nodelay;

    
}


服務(wù)咨詢
1對(duì)1咨詢,專業(yè)客服為您解疑答惑
聯(lián)系銷售
15899750475
在線咨詢
聯(lián)系在線客服,為您解答所有的疑問(wèn)
ARE YOU INTERESTED IN ?
感興趣嗎?

有關(guān)我們服務(wù)的更多信息,請(qǐng)聯(lián)系項(xiàng)目經(jīng)理

15899750475 楊先生