My site was burning through bandwidth every day. Once I went through the server logs, the reason was obvious: most of that traffic came from worthless junk spiders, AI crawlers, and every flavor of SEO scraper.
These crawlers don't bring a site anything of value. They just keep eating bandwidth and server resources, slow down page loads, and can even get in the way of real visitors. The most direct fix, and the one that gets at the root, is to block them outright.
What I can't do is block real users, or Baidu, Google, and Bing. So I put together a set of rules aimed specifically at the usual junk spiders and the useless AI crawlers. Bookmark it or repost it if it's useful.
Nginx config (BT Panel example)
Where: Website → your site → Settings → Pseudo-static
# 1. Block AI Crawlers
if ($http_user_agent ~* "GPTBot|ChatGPT|ClaudeBot|Anthropic|OpenAI|Perplexity|PPLX|Google-Extended|Applebot-Extended|Amazonbot") {
return 403;
}
# 2. Block Spam SEO Bots and Scrapers
if ($http_user_agent ~* "AhrefsBot|SemrushBot|MJ12bot|DotBot|BLEXBot|Webdup|Ezooms") {
return 403;
}
# 3. Block Empty or Abnormally Short User Agents (port scanners, malicious hits)
if ($http_user_agent ~* "^$|^.{0,5}$") {
return 403;
}Pair it with robots.txt rules
# AI Crawlers
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: PerplexityBot
Disallow: /
User-agent: PPLX-*
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: Applebot-Extended
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: YouBot
Disallow: /
User-agent: ByteDance
Disallow: /
User-agent: cohere-ai
Disallow: /
User-agent: Claude-Web
Disallow: /
# Spam / Junk Crawlers
User-agent: AhrefsBot
Disallow: /
User-agent: SemrushBot
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: DotBot
Disallow: /
User-agent: BLEXBot
Disallow: /
User-agent: Webdup
Disallow: /
User-agent: Ezooms
Disallow: /
User-agent: ScreamingFrog
Disallow: /
User-agent: SeznamBot
Disallow: /
User-agent: PetalBot
Disallow: /
User-agent: AspiegelBot
Disallow: /
User-agent: Go-http-client
Disallow: /
# Legitimate Search Engine Bots
User-agent: Baiduspider
Allow: /
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
User-agent: Googlebot-Image
Allow: /
User-agent: Bingbot-Image
Allow: /
User-agent: *
Crawl-delay: 5
Allow: /Save it as robots.txt and drop the file in the site's root directory. To test, open https://your-domain/robots.txt — if it loads, the rules are live.
The crawlers in detail: who runs them, what they do, why they're blocked
1. AI crawlers (training and AI search — pure resource drain, no real visitors)
| User-Agent | Company / project | What it does | Why it's blocked |
|---|---|---|---|
| GPTBot, ChatGPT-User, OAI-SearchBot | OpenAI (US) | Crawls the open web to train the ChatGPT model family and power AI search | High-concurrency crawling that eats bandwidth and server resources; the content feeds commercial AI training and never sends a real visitor back |
| ClaudeBot, anthropic-ai, Claude-Web | Anthropic (US) | Collects training data for the Claude model family | Pure resource consumption with no visitor conversion, at a high crawl rate that loads up the server |
| PerplexityBot, PPLX-* | Perplexity AI (US) | AI search engine crawler that answers questions and serves results from web content | Enormous request volume, data-only grabbing, no effective users sent to the site |
| CCBot | Common Crawl (open-source project) | Archives web pages at scale and underpins most of the world's AI models | Broad and frequent crawling from a base-layer AI data source with no commercial or visitor value at all |
| Google-Extended | Collects training content specifically for Gemini | Separate from the regular search crawler; it serves AI training only, produces no search traffic, and generates a lot of wasted requests | |
| Applebot-Extended | Apple | Scrapes training data for Apple Intelligence | A commercial-AI-only crawler: consumes resources, refers no traffic |
| Amazonbot | Amazon | Data collection bot for Amazon's AI operations | Pure data scraping with no real visitors, consuming server resources |
| cohere-ai | Cohere AI (Canada) | Collects training data for a major commercial model abroad | High-frequency crawling that serves only its own AI business, with zero return for the site |
| YouBot | You.com | AI search engine crawler | Crawls pages purely for AI retrieval; refers almost nothing and makes up a large share of junk traffic |
| ByteDance | ByteDance | Collects data for its AI products (Doubao, the content recommendation models, and so on) | Heavy concurrent access, mostly background data collection rather than genuine users |
2. Junk SEO and site-analysis spiders (third-party tools for competitor research and statistics)
| User-Agent | Company / project | What it does | Why it's blocked |
|---|---|---|---|
| AhrefsBot | Ahrefs (a leading SEO tool vendor) | Backlink, keyword ranking, authority, and competitor analysis | Extremely aggressive crawling with huge daily request counts, generating commercial analytics data and no visitors |
| SemrushBot, BLEXBot | Semrush (a well-known SEO marketing tool) | Traffic, index coverage, keyword, and competitor monitoring | High-frequency polling, purely tool-driven access with no conversion value that burns a lot of bandwidth |
| MJ12bot | Majestic | Backlink lookup and domain-authority analysis | Widely regarded as a brute-force crawler that often ignores robots.txt and hammers sites, easily spiking server load |
| DotBot | Raven Tools / Moz | All-in-one site owner SEO analysis | Periodically bulk-crawls pages for third-party statistics — junk traffic |
| ScreamingFrog | Screaming Frog | Full-site crawling, SEO audits, page scraping | Often used to bulk-harvest every link and page on a site, firing masses of requests from a single IP in a short window — a real scraping risk |
| SeznamBot | Seznam | Small Czech search engine | A niche engine abroad with virtually no local visitors, yet it crawls constantly; the return is far below the resource cost |
| PetalBot, AspiegelBot | Huawei Petal Search | Huawei's search engine crawler | Low market share, very few real visitors, and a high crawl rate — terrible value for the resources |
3. Scrapers and scanners (malicious harvesting, vulnerability scans, automated tools)
| User-Agent | Type | What it does | Why it's blocked |
|---|---|---|---|
| Webdup, Ezooms | Generic scraping tools | Copying an entire site, bulk-article scraping, building mirror sites | Straight-up theft of original content — malicious infringement that also floods the server with junk requests |
| Go-http-client | Generic open-source HTTP library | The default UA for vulnerability scanners, port probes, malicious scripts, and automated attack tools | This UA almost always means a scanner or malicious test program rather than a genuine visit — a security risk |
| Empty UA / 1–5 character UA | Various scanners, malicious tools, traffic-inflation scripts | Anonymous bulk site scanning, stress testing, malicious access | No legitimate client identity; the classic signature of network scanning, CC attacks, and malicious crawlers, and it has to be blocked |
4. Legitimate search engines allowed through (they bring real visitors, so they keep crawl access)
| User-Agent | Operator | Notes |
|---|---|---|
| Baiduspider, Baiduspider-Image | Baidu | The main search engine in mainland China, bringing substantial organic search traffic and indexing pages normally |
| Googlebot, Googlebot-Image | The world's leading search engine, serving overseas traffic and crawling pages in full compliance | |
| Bingbot, Bingbot-Image | Bing | Microsoft's search engine, sending search traffic with well-behaved crawling |
For the many operators who play dirty, blocking IP ranges is the only option left.
A few notes:
- What robots.txt is: an industry good-faith agreement. Legitimate AI and SEO crawlers respect it; malicious scanners and scrapers ignore it outright, which is why you need Nginx/IIS rules to enforce the block.
- The logic behind the blocklist: every UA above shares one trait — it only consumes bandwidth and CPU and never produces real users or business value.
Crawl-delay: 5: throttles unknown crawlers to one request every five seconds, easing sudden spikes in traffic.
现在的AI爬虫太讨厌了。防不胜防啊
前边 Nginx 已经全给都403了,爬虫根本就看不到 robots.txt 里的规则吧。
GPT和谷歌等会遵守robots.txt的爬虫不要拦截,只拦截不听 robots.txt 的爬虫会好一点。