AI crawler traffic on a WordPress site
A client’s WordPress site started timing out at 9am and again at 2am. No campaign, no traffic spike in Analytics, no plugin update that day. The host sent the same message it always sends: PHP worker limit reached. When I pulled the access log, the site was serving 41,883 requests in 24 hours to user agents that never appeared in any analytics tool. GPTBot alone accounted for 18,204 of them.
This was not a DDoS. It was five AI crawlers doing exactly what they are designed to do, and a WordPress install that rendered a full PHP page for every single request. Here is the process I used to confirm which crawlers were real, decide which ones deserved access, and throttle the rest at the edge without losing the citations that send traffic back.
What the access log actually showed
Start with evidence, not guesses. Your web server log already records the user agent if you are on the default combined format. This one command groups every AI crawler hit in the current log file:
Five crawlers, 34,065 hits in one day, on a site with roughly 2,300 published posts. GPTBot was re-reading the archive, OAI-SearchBot was indexing for ChatGPT search, and PerplexityBot was doing the same for its answer engine.
The more useful question is what they were requesting. This is where the load came from:
GPTBot’s top targets that day were /feed/ with 3,128 requests, /wp-json/wp/v2/posts?per_page=100 with 2,914, the internal search URL /?s=ai+tools with 1,806, one popular post with 944, and the sitemap with 611.
That output explains the slowdown better than the raw hit count. Feeds, the REST API, and internal search results are three of the most expensive URLs on any WordPress site. A request to /?s=ai+tools runs a database query across every post and cannot be served from a page cache. A request to /feed/ builds XML for the latest posts. Neither is a page a human visitor needs, and both were being fetched thousands of times a day.

Why robots.txt did not fix it
The first thing most people do is add Disallow: / for GPTBot in robots.txt, then wonder why the server load does not move. There are two reasons.
robots.txt is a request, not an access control. It is a text file a crawler chooses to fetch and chooses to honor. A compliant crawler will stop requesting disallowed paths, but it will still fetch robots.txt itself, and it can request every allowed URL as fast as it likes. There is no rate limit in the protocol. The non-standard Crawl-delay directive is ignored by Google and by OpenAI’s crawlers, so it does nothing here.
Every request that reaches WordPress has already cost you a PHP worker. The request path looks like this: edge or CDN, then nginx or Apache, then PHP-FPM, then wp-load.php, then plugins, then the theme, then MySQL. On a typical managed plan you get somewhere between 4 and 12 PHP workers. An uncached WordPress page takes 80 to 250ms of worker time. Ten concurrent crawler requests can hold every worker for the duration, and real visitors queue behind them. By the time a plugin inspects the user agent, the expensive part has already happened.
That is why the fix has to happen before PHP, at the edge or in the web server config. If your host caps workers and your site is the one hitting the cap, this is also the moment to look at the plan itself. A host that gives you a proper worker pool and a real CDN in front changes the math.
If your hosting is the bottleneck: Kinsta keeps your site safe with automatic daily backups and one-click restore, so a bad update or a hack is a rollback, not a rebuild. Their support is top tier, and 24/7 live chat is staffed by WordPress engineers who will help fix the actual problem with you, so you are not stuck waiting on your developer to reply. Plans start at $35 per month.
Step 1: Verify the crawler is real before you block it
User agents are trivially forged. Anyone can send GPTBot in a request header, and scrapers do it constantly because it sometimes gets them whitelisted. So the first job is separating real crawlers from impostors.
OpenAI, Anthropic, and Perplexity all publish their crawler IP ranges as JSON. Fetch the feed and check the connecting IP against it, not the string in the header:
import ipaddress, json, urllib.request
FEEDS = {
"GPTBot": "https://openai.com/gptbot.json",
"OAI-SearchBot": "https://openai.com/searchbot.json",
"ChatGPT-User": "https://openai.com/chatgpt-user.json",
"PerplexityBot": "https://www.perplexity.ai/perplexitybot.json",
"ClaudeBot": "https://claude.com/crawling/bots.json",
}
ip = ipaddress.ip_address("132.196.86.42")
for name, url in FEEDS.items():
feed = json.load(urllib.request.urlopen(url))
for entry in feed["prefixes"]:
cidr = entry.get("ipv4Prefix") or entry.get("ipv6Prefix")
if ip in ipaddress.ip_network(cidr):
print(f"{ip} matches {name} prefix {cidr}")
Run it against one IP from your log and you get a definitive answer:
132.196.86.42 matches GPTBot prefix 132.196.86.0/24
As of this week the feeds contain 18 prefixes for GPTBot, 39 for OAI-SearchBot, 235 for ChatGPT-User, 13 for PerplexityBot, and 14 for ClaudeBot. Those numbers change, which is why you check the live feed instead of copying a list into a firewall rule and forgetting it. For Googlebot the equivalent check is reverse DNS: the IP must resolve to crawl-*.googlebot.com or *.google.com, and then forward-resolve back to the same IP.
If an IP claiming to be GPTBot is not in the feed, it is a scraper wearing a costume. Block it by IP or challenge it, and do not feel bad about it.

Step 2: Decide which crawlers deserve access
This is the part people get wrong. “Block the AI bots” sounds clean until you realize the bots do different jobs. Blocking the training crawler does not remove you from AI answers, and blocking the answer crawler does not protect your content from training. They are separate pipelines.
| Crawler | What it does | My default |
|---|---|---|
| GPTBot | Collects content for OpenAI model training | Block if you sell content or run a paywall |
| OAI-SearchBot | Builds the index used by ChatGPT search | Allow, this is your citation pipeline |
| ChatGPT-User | Fetches a page when a user asks ChatGPT about it | Allow, the visit is user initiated |
| PerplexityBot | Indexes pages for Perplexity answers and citations | Allow, rate limit to 30 requests per minute |
| ClaudeBot | Training crawl for Anthropic | Block on content sites, allow on docs |
| CCBot | Common Crawl, feeds many downstream models | Block unless you want maximum reach |
If you want the longer version of this decision, including the licensing and SEO tradeoffs, I wrote a separate guide on whether to block AI scrapers on WordPress. The short version: blocking training crawlers is a content licensing decision. Blocking answer crawlers is a visibility decision. Do not make one while thinking you are making the other.
Before you write any rules, confirm the crawlers can even reach the pages you care about. A quick pass with an AI crawler access checker will show you what is allowed and what is already blocked by an old rule you forgot about.
Step 3: Throttle at the edge, not inside WordPress
On Cloudflare, the fastest version is a rate limiting rule. Set the expression to (http.user_agent contains "GPTBot"), choose 30 requests per minute per IP, and set the action to Block with a 10 minute timeout. Do the same for ClaudeBot and CCBot if you are blocking them outright.
For impostors, a WAF custom rule is better than a rate limit. This expression blocks anyone claiming to be GPTBot who is not a Cloudflare verified bot:
(http.user_agent contains "GPTBot" and not cf.client.bot)
If you are not on Cloudflare, or you want the limit to live with the site, nginx can do it with a map. The trick is an empty key: when the key is empty, nginx skips rate limiting for that request, which lets you throttle some crawlers and leave others alone.
map $http_user_agent $crawl_key {
default "";
~*GPTBot $binary_remote_addr;
~*ClaudeBot $binary_remote_addr;
~*PerplexityBot $binary_remote_addr;
~*CCBot $binary_remote_addr;
}
limit_req_zone $crawl_key zone=ai_crawl:10m rate=30r/m;
limit_req_status 429;
server {
location / {
limit_req zone=ai_crawl burst=20 nodelay;
}
}
Two details matter here. First, limit_req_status 429 is deliberate. A 429 tells a well behaved crawler to slow down and retry later. A 403 looks like a permanent block and can get the URL removed from an index you wanted to be in. Second, per IP limits are only a partial defense against distributed crawlers. ChatGPT-User has 235 published prefixes. The rate limit protects your worker pool from one aggressive source, but it will not cap aggregate traffic. That is what the next step is for.
Step 4: Make a crawler hit cheap instead of trying to stop it
The real win was not blocking. It was caching. A crawler request that never reaches PHP costs you almost nothing, and it keeps the pages available for the crawlers you decided to allow.
In Cloudflare, add a cache rule with the expression:
(http.cookie !~ "wordpress_logged_in|wp-postpass|comment_author")
Set cache eligibility to Eligible for cache, edge TTL to 2 hours, and browser TTL to 5 minutes. Anonymous visitors, including every crawler, now get the cached HTML. Logged in users still get fresh pages. If you use a WordPress cache plugin, confirm it is serving cache to requests with no cookies, because many “optimized” setups skip caching whenever any cookie is present, which is exactly the request pattern a crawler produces.
Then close the expensive holes. Add Disallow: /?s= and Disallow: /feed/ to robots.txt for the crawlers you allow, and consider disabling the REST API for anonymous requests if nothing on your site consumes it. If you edit robots.txt through Yoast, remember that Yoast filters the virtual file, and a physical robots.txt in the web root will override it entirely. That is a common reason a rule appears to be ignored. The full file syntax is covered in the robots.txt guide for AI crawlers.
Common mistakes that make this worse
- Blocking on the substring “bot”. That catches Googlebot and Bingbot, and you lose organic traffic while the AI crawlers keep coming.
- Blocking in
functions.php. PHP has already started, plugins are already loaded, and the worker is already occupied. The block has to happen upstream to protect the pool. - Blocking OAI-SearchBot to “opt out of AI”. You opted out of citations, not training. GPTBot is the training crawler.
- Trusting the user agent. Scrapers forge it. Verify against the published IP feed before you allow or block anything.
- Forgetting feeds, search, and the REST API. Those are the URLs doing the damage, and they are not in your sitemap.
- Using 403 for rate limiting. A 429 is temporary and gets retried. A 403 can be treated as a permanent removal.
The result, 24 hours later
After the cache rule and the nginx limits, the same site served 8,912 crawler requests in 24 hours, down from 41,883, without blocking OAI-SearchBot or ChatGPT-User. Edge bandwidth dropped from 6.4 GB to 1.8 GB per day. Time to first byte, measured with curl -o /dev/null -s -w '%{time_starttransfer}\n' from three locations, went from 4.1 seconds to 380ms. The PHP worker saturation alerts stopped that same night.
The part I did not expect: AI referral traffic held steady. Older posts kept getting cited in ChatGPT and Perplexity answers because the answer crawlers were never touched. The crawlers costing the most CPU were also the ones contributing the least traffic.
Read our guide to blocking AI scrapers on WordPress. It covers the licensing, SEO and traffic tradeoffs before you write a single rule.
Read the GuideFrequently asked questions
No. GPTBot is the training crawler. ChatGPT search uses OAI-SearchBot to build its index and ChatGPT-User to fetch a page when someone asks about it. If you want citations, keep those two allowed.
Not reliably. robots.txt is advisory and has no rate limit. A compliant crawler may drop disallowed paths, but every allowed request still reaches WordPress and consumes a PHP worker. Throttle at the edge or in the web server instead.
Check the connecting IP against the range published at https://openai.com/gptbot.json. The user agent string alone proves nothing because it can be forged in one line of code.
Yes. Return a 429 after a threshold, for example 30 requests per minute per IP in nginx or Cloudflare. That protects the worker pool while still letting the crawler index the pages you want indexed.
Blocking GPTBot, ClaudeBot or CCBot does not touch Googlebot. Blocking by a generic substring like bot does, because it also catches Googlebot and Bingbot. Keep every rule specific and test it against a known Googlebot IP first.
Final thoughts
The fix is not “block AI bots”. It is a policy decision followed by an infrastructure change. Verify which crawler is actually at the door, decide which ones you want, then move the enforcement to the edge and make the allowed traffic cheap to serve. Do that and a crawler flood becomes a line item you control instead of an outage you explain to a client.
If you only take one thing from this: check your logs before you check your robots.txt. The log tells you what is happening. robots.txt only tells crawlers what you would prefer.

