Strange Traffic Spike? Bots, AI Scrapers and Whether to Block a Whole Country

Strange traffic from one country is usually bots. Learn to spot them, verify Googlebot, and use challenges before a country block.

Bar chart of website visits with a sharp orange spike, next to the labels Block and Challenge, for a guide on bot traffic and country blocking

A sudden wave of visits from one country is usually automated traffic (software programs, called bots), not people. Do not block the country first. Turn on your protection layer’s bot setting, show suspicious visitors a challenge instead of a block, and rate limit the pages bots hit; a whole-country block is a last resort for sites that only serve certain regions. We checked every setting and plugin figure below on 15 November 2026 against vendor documentation and the WordPress.org plugin directory.

If the jump worries you, or a visitor sent a screenshot saying “Too Many Requests”, take a breath. Neither means your site was hacked. Both are common and can be checked in an afternoon. This guide names no country and does not claim to know who sits behind any traffic, because the steps are the same for every country.

Is a sudden wave of visits from one country real people?

Usually not. A small business site that serves its own region does not suddenly gain thousands of readers from a country it has never served. More often the visits come from programs that read pages automatically: search engines, collectors of text for AI products, or scanners looking for weak sites. Analytics shows them all as “visits” under a country.

One honest limit: the country shown is only where the connection appears to come from. A program running on a rented server in one country can be run by someone in another, and a visitor on a privacy service (a VPN) looks like they are somewhere else. Treat the country as a clue, not proof.

How can you tell bots from people?

Look for patterns that real readers do not produce:

  • Zero or near-zero visit time. Hundreds of visits that each last a second or less.
  • The same few pages, again and again. Bots often hit your search page, your login page, your cart or your newest posts, over and over.
  • No sales, no enquiries. Real interest produces some orders, form messages or sign-ups. If a large jump in visits brings none of those, the extra visitors were probably not shoppers or readers.
  • A strange “source” in your reports. Visits that name an unfamiliar website as the place they came from, with no real engagement, are the classic sign of referral spam (fake visits that exist only to get you to look at the sender’s website).

Write down what you see (date, pages, numbers). Your host will ask for exactly that.

Where do you look to see the traffic?

Three places, from easiest to most detailed. Use all three if you can, because they tell different parts of the story.

1. Your analytics, by country

Most analytics tools, including Google Analytics 4, split visitors by country. Menu names change from time to time, so look for a users or demographics section and then a country or location view. Compare the last seven days with the seven before, and note the country, the visits and the average visit length. Google states that Analytics automatically excludes traffic from known bots and spiders, and that you cannot turn this off or see how much was excluded (Google Analytics Help, known bot-traffic exclusion). Bots that are not on that list still appear.

2. Your host’s visitor or bandwidth stats

Most hosting control panels show how much data your site sent and how many requests it handled each day. Look for a day with a sharp rise. This view comes from the server, so it counts visitors that analytics may miss.

3. The access log

An access log is a plain text file kept by your web server. It adds one line for every request made to your site, with the visitor’s address, the time, the page asked for and the name the visitor gave itself. We explain where to find yours and how to read it in What Your WordPress Access Log Shows That Analytics Hides, so this guide does not repeat that. The short version: ask your host where the log is, download one day’s file, and count which addresses and pages appear most.

If you or your host can open a terminal, these standard commands count the busiest addresses and the most common visitor names. They assume the common log layout, where the address is the first item on each line (checked on 15 Nov 2026).

# The 10 addresses that made the most requests
awk '{print $1}' access.log | sort | uniq -c | sort -rn | head -10

# The 10 most common visitor names (user agents)
awk -F'"' '{print $6}' access.log | sort | uniq -c | sort -rn | head -10

# How many requests were for your site search page
grep -c 'GET /?s=' access.log

If one address or visitor name makes up most of the file, you have found your wave. Copy the top lines to your notes.

What is the difference between good bots and bad bots?

A good bot does a job you want and follows your rules. A bad bot ignores them. The trouble is that you cannot tell them apart by name, because any program can call itself anything.

Kind of visitor

Examples

Do you want it?

How to handle it

Search engine crawler

Googlebot, Bingbot

Yes, it brings visitors

Never block. Verify a visitor claiming this name before acting on it.

AI crawlers that publish a name

GPTBot, ClaudeBot, OAI-SearchBot

Your choice

Ask in robots.txt, see the AI crawler section below.

Scrapers, scanners and fake crawlers

Copy bots, a program calling itself Googlebot

No

Verify names, then challenge, rate limit, or block by network.

How do you check that a visitor really is Googlebot?

Do a reverse DNS check, which asks the internet what name belongs to an address, then confirm the name points back to the same address. Google documents exactly this method: look up the address from your log, check that the returned name ends in googlebot.com, google.com or googleusercontent.com, then look that name up again and confirm it returns the original address (Google Search Central, verifying Googlebot).

# Step 1: reverse lookup of the address from your log
host 66.249.66.1
# expected: a name like crawl-66-249-66-1.googlebot.com.

# Step 2: forward lookup of that name
host crawl-66-249-66-1.googlebot.com
# expected: the same address you started with

That is Google’s own example (checked on 15 Nov 2026). Google also publishes its crawler address ranges as JSON files, so a script can compare an address against the list instead (Google Search Central, Googlebot overview). A real Googlebot passes both steps. A fake one claims the name but fails the lookup. If you are not comfortable with a terminal, ask your host to run the check or use the verified-bot setting in your protection layer.

What does “Too Many Requests” mean, and who is sending it?

“Too Many Requests” is the plain-English name for the error code 429. The Mozilla developer documentation says it “indicates the client has sent too many requests in a given amount of time”, and calls the practice of asking the sender to slow down “rate limiting” (MDN, 429 Too Many Requests). In short, some part of your setup decided one visitor was asking for too much, too fast, and told it to wait. The message may include a Retry-After note saying how long to wait (MDN, Retry-After).

For comparison, a 403 Forbidden means “not allowed” and a 503 Service Unavailable means “not ready”.

Who is sending the 429?

A 429 can come from any layer between the visitor and your site. Ask in this order:

  • Your protection layer. If you use a service in front of your site, such as Cloudflare, its rate limiting rules can send one. Cloudflare’s documentation says its block action returns a 403 in most security features and a 429 for rate limiting rules (Cloudflare, rule actions).
  • Your security plugin. Many have a setting that limits login attempts or requests per minute. Check the plugin’s firewall settings and its blocked-visitor log.
  • Your host. Some hosts limit requests per visitor or per account to protect shared servers. The host’s support team can say whether they sent it.

The error page is the quickest clue. A page with a protection service’s logo points to that service; a plain white page points to the host or a plugin. Screenshot it with the date and time. If real visitors are stuck, ask them to wait a few minutes, then raise a limit that counts too aggressively (for example, five requests in ten seconds on the whole site) or limit only search and login pages.

Why can blocking a whole country hurt you?

A country block feels decisive, but the cost often shows later, in four ways.

  • Real customers and readers get shut out. People travel. They also use phone networks, work networks and VPNs whose connection appears to come from somewhere else. A customer on holiday who cannot reach your checkout will not write to ask why.
  • Search engines and other useful visitors can be caught. Google says Googlebot “usually originates from the USA” (Google Search Central, managing multi-regional sites), so a block on that country would be a serious mistake. Uptime checkers, payment services and backup tools connect from servers in many places too. Check each tool’s own documentation before you block.
  • Mistakes are costly. Google says that for a 403 or other 4xx error (except 429) crawlers treat the content as nonexistent, remove the URL from the index if it was indexed, and crawl less often, and that URLs persistently returning server errors are removed (Google Search Central, HTTP status codes). A rule that wrongly blocks a search crawler for days can cost rankings.
  • Bots simply move. A blocked program can usually return from another address at almost no cost, so rules that look at behaviour beat rules that look at place alone. This is our reasoning, not a statistic.

What are the gentler options, in order?

Work down this list. After each step, wait a day, check your host’s stats or log again, and stop when the wave is under control. The steps use Cloudflare as the example because it is the protection layer many WordPress owners use and its free plan covers most of this. Menus move from time to time, so names on your screen may differ a little.

Step 1: Turn on the bot setting

Cloudflare’s free setting is called Bot Fight Mode. Its documentation says it identifies traffic matching known bot patterns and issues challenges that make the requesting client do heavy calculations. To turn it on, open Security, then Settings in the Cloudflare dashboard, filter by Bot traffic, find Bot fight mode and switch it on (Cloudflare, Bot Fight Mode on the Free plan). Two cautions from the same page: your own custom rules cannot skip it, and it may challenge an app or API that calls your site. If you run a mobile app or a service that connects to your site, read that page first.

Without Cloudflare, look in your host or security plugin for “bot protection” or “block bad bots”.

Step 2: Challenge instead of block

A block shuts the door. A challenge asks the visitor to prove they are not a program and lets real people through. Cloudflare’s Managed Challenge chooses between a non-interactive check and a simple interactive step. It is the best first answer to “one country, a lot of traffic”, because a traveller can still get in while simple bots usually cannot.

On Cloudflare you create a custom rule. The Free plan allows 5 custom rules and every action except Log (Cloudflare, custom rules). The country field is ip.src.country, the two-letter country code in ISO 3166-1 Alpha 2 format (Cloudflare, ip.src.country). Cloudflare’s own example for a country challenge also leaves out verified bots, so Googlebot and Bingbot get through (Cloudflare, allow traffic from verified bots). Adapted, the rule looks like this, with the placeholder codes replaced by the ones in your notes (checked on 15 Nov 2026):

Expression:  (ip.src.country in {"AA" "BB"} and not cf.client.bot)
Action:      Managed Challenge

Name it clearly, such as “Challenge wave from two countries, 15 Nov”, so you can find and remove it later.

Step 3: Rate limit the pages bots hit

Rate limiting means no visitor may ask for these pages more than a set number of times in a set time. On the Free plan Cloudflare lists these limits: one rule, a counting period of 10 seconds, a mitigation timeout of 10 seconds, counting by IP address only, and only the Path and Verified Bot fields in the rule expression (Cloudflare, rate limiting rules). That is still useful for one busy page. Plans change, so read that page on the day you act.

Choose the pages your log shows bots hit most (the search page, /wp-login.php, the cart or checkout) and pick a limit no real person would reach. Security plugins and many hosts offer a similar “limit requests” setting.

Step 4: Block by network when one hosting company is the source

Every connection comes from a network with a number called an ASN (autonomous system number). Cloudflare describes the field ip.src.asnum as the number for the network associated with the client address (Cloudflare, ip.src.asnum). Many bots run from rented data-centre servers. If your log shows most of the wave coming from one hosting company’s network, a rule matching only that network removes the wave without touching ordinary home and phone visitors in the same country. A public “IP address lookup” service shows the network behind an address.

Step 5: Ask named AI crawlers not to crawl

Some of the wave may come from companies gathering text for AI products. Several publish a crawler name and a way to opt out. The tool for asking is a small text file called robots.txt at the top of your site, which Google says must sit at the root of the site host and groups rules by crawler name (Google Search Central, create a robots.txt file).

  • OpenAI lists OAI-SearchBot (surfaces sites in ChatGPT search), GPTBot (content that may be used to train its models) and ChatGPT-User (user-triggered visits, where robots.txt rules may not apply). Each setting is independent, and search changes can take about 24 hours to take effect (OpenAI, crawlers overview).
  • Anthropic lists ClaudeBot, Claude-User and Claude-SearchBot, honours robots.txt, and supports the non-standard Crawl-delay line. It says blocking by address is not a reliable opt-out because it stops the crawler reading your robots.txt (Anthropic, crawler help article).
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

Add one block per crawler. If you also block a company’s search crawler, you may drop out of the answers its tool gives, so decide that on purpose. Cloudflare also offers “AI Crawler and Agent access policies” under Security, then Settings (Cloudflare, block AI bots). For the longer list of AI crawlers, our sister site has a guide: How to Block AI Crawlers from Scraping Your WordPress Site.

The honest limit: robots.txt is a request, not a lock. The official standard, RFC 9309, says its rules are not a form of access authorization. A program that ignores it needs the rate limits and challenges above.

Is “Under Attack mode” the right switch for a traffic spike?

Only briefly. Cloudflare calls I’m Under Attack mode a last-resort option because it shows every visitor a check page, can pause access and can affect analytics. Turn it on with the Under Attack Mode switch in Quick Actions on the zone overview, and off again once the Step 1 to 3 rules work (Cloudflare, Under Attack mode).

Can you block a country on Cloudflare’s free plan?

Yes, with a custom rule, not with the older IP Access Rules. Cloudflare’s IP Access Rules page says blocking by country there is available only on Enterprise, and that other plans can geoblock with WAF custom rules (Cloudflare, IP access rules). So on Free, Pro and Business you write the custom rule from Step 2 and change the action from Managed Challenge to Block. Keep the verified-bots exception in the expression.

Can a WordPress security plugin block a country?

Some can, but often only in the paid version. We read each plugin’s WordPress.org description and pulled its numbers from the WordPress.org plugin API on 15 November 2026.

Plugin

Country blocking

Rating (reviews)

Active installs

Last updated

Support threads resolved

Wordfence Security

Premium only, per its description

4.7 of 5 (5,050)

5+ million

10 Nov 2026

152 of 177

All-In-One Security (AIOS)

Premium only, per its description

4.7 of 5 (1,720)

1+ million

30 Oct 2026

23 of 25

Kadence Security (formerly iThemes Security)

None listed in its description

4.6 of 5 (3,992)

700,000+

14 Oct 2026

5 of 12

iQ Block Country

Free, built for it

3.9 of 5 (166)

20,000+

13 Nov 2026

0 of 1

Read the table with care. Ratings and install counts say how widely a plugin is used, not how well its country blocking works, and a small thread count makes the “resolved” share a weak signal. Our reading of the descriptions:

  • Wordfence and AIOS both list country blocking as a Premium feature. The AIOS description says it can block the entire site or specific pages, and lets you allow chosen addresses from a blocked country. Wordfence’s description says Premium users can block countries.
  • iQ Block Country is the free option that exists for this job, and you can allow or block countries on the front end, the admin area or both. It needs a free MaxMind country database that you download and upload yourself, because the WordPress licence stops the plugin from fetching it for you. Its description also warns that caching and geo blocking do not work well together.

Can you block a country with .htaccess?

Only partly. The .htaccess file is a settings file that Apache web servers (and LiteSpeed) read, so it will not work on a host running Nginx. Apache has no built-in country feature. Country filtering needs an extra module such as mod_maxminddb or the older mod_geoip, which most shared hosts do not offer, so ask your host first. What .htaccess does well is block an address or a range of addresses, which suits Step 4 once you know the network behind a wave. Apache’s Require not ip inside a RequireAll block does it (Apache, mod_authz_core). This example uses a range reserved for documentation (checked on 15 Nov 2026):

# Block one address range. Put this ABOVE the "# BEGIN WordPress" line.
<RequireAll>
    Require all granted
    Require not ip 203.0.113.0/24
</RequireAll>

Download a copy of the file first. A typing mistake in .htaccess can take the whole site offline, and your host can restore it from the copy.

When is blocking a whole country the right call?

When you serve only certain regions (a local shop that ships to one country), the country brings no customers or search value, and the gentler steps did not calm the wave. You also need to be able to switch the rule off in seconds if a real customer complains.

How to block in a way you can undo

  1. Write the rule’s name and date in your notes, and why you made it.
  2. Start with Managed Challenge. Move to Block only if challenges are clearly not enough.
  3. Keep the verified-bots exception, and test your own address first so you do not lock yourself out.
  4. After a week, read the rule’s event log. If it caught nothing a real person would send, keep it. If it caught buyers, remove it.

Watch your search reports for a few weeks afterwards. A sudden rise in crawl errors after a new rule means the rule caught something it should not have.

Common mistakes people report

These are the problems that come up again and again in vendor documentation and plugin support threads. We read each source on 15 November 2026. We could not read recent Reddit threads from our tools, so this list rests on documentation and support forums, and some forum threads are older than a year (noted below).

  • Locking yourself out. A country rule that includes your own country, or your own address, blocks you too. The iQ Block Country description lists “I blocked my own country” as a known case and tells people to ask their host for help getting back in (iQ Block Country, FAQ). Test with your own address and keep your host’s panel handy.
  • An old rule that stays after a downgrade. In an older WordPress.org support thread (the page shows only “five years ago” for the reply), a site moved from Wordfence Premium to free and still showed a notice that the United States was blocked. Support said the notice was not accurate after a downgrade and told the owner to remove the old rule under Firewall, then Blocking, in the “Current blocks” list (WordPress.org support thread). After any plan change, re-read your block list.
  • Blocking Googlebot by accident. Country rules that do not exempt verified bots can return 403 errors to search crawlers, and Google says it then drops URLs and slows crawling (Google Search Central). Cloudflare’s own country-challenge example adds not cf.client.bot for this reason.
  • Expecting a cache to respect the block. A page served from a cache never reaches a plugin, so a blocked country can still see cached pages. The iQ Block Country description says some caching plugins work with it and others, including W3 Total Cache and WP Rocket, do not. A rule at the Cloudflare layer or at your host acts before the cache.
  • Expecting to exempt trusted services from Bot Fight Mode. Cloudflare says custom rules and Page Rules cannot skip it, and it may challenge API or mobile app traffic (Cloudflare docs). If your payment service or app breaks after turning it on, that is the first thing to check.
  • Looking for country blocking in the wrong Cloudflare screen. IP Access Rules offers country blocking only on Enterprise, so owners on other plans need the custom-rule route from Step 2 (Cloudflare docs).
  • Judging the result by your analytics. The iQ Block Country FAQ notes that statistics tools and logs can still show hits from blocked countries, because each tool uses its own country database. Use your host’s request graph and the rule’s event log instead.

When should you stop and ask your host?

Ask your host if the site is slow or down during the wave, if your host’s stats show requests but you cannot find the source, or if you cannot get back into your dashboard after a rule. Send a short, exact message:

Tell them the date and time, paste the top lines from the log, and ask which network the requests come from, whether a host limit could be sending the 429, and whether they can block that network at server level.

If you suspect more than traffic, such as new admin users or changed files, read Your WordPress Site Keeps Getting Hacked? The Hidden Reason Why and work through our WordPress security audit checklist. If you rely on a free security plugin, Your Security Plugin Is Protecting You a Month Late explains a gap worth knowing about.

One-page decision table

What you see

Likely cause

Do this

Do not do this

Big jump from one country, near-zero visit time, no sales

Bots on rented servers

Bot setting, then Managed Challenge for that country with verified bots exempt

Hard block on day one

Same few pages (search, login, cart) hit again and again

Bots hammering one feature

Rate limit those pages only

Rate limit the whole site

Most requests from addresses of one hosting company

Rented server running a bot

Rule matching that network (ASN)

Block the country that network sits in

Named AI crawler in the log

A company reading pages for AI products

robots.txt entry for that name, or AI crawler access policies

Expect robots.txt to stop fake crawlers

Real visitor sees “Too Many Requests”

A rate limit is too strict or shared

Wait, then raise the limit or allow the address

Switch off all protection

Questions people ask

Should you block all traffic from one country?

Not as a first step. Try the bot setting, a challenge and rate limits first. A country block is reasonable when you serve only certain regions, the visits bring nothing, and the gentler steps did not work. Make the rule easy to switch off and review it after a week.

Is strange traffic from one country a sign my site was hacked?

Not by itself. Most strange traffic is bots reading pages, which does not change your files. Signs of an actual break-in are different: new admin users you did not create, files you did not change, or visitors sent to other sites.

Will blocking visitors hurt my Google rankings?

It can, if you block the wrong thing. Google says persistent 4xx and server errors lead to pages being removed from the index. Verify any visitor claiming to be Googlebot before you act, and exempt verified bots in country rules.

Why does my site show “Too Many Requests”?

Your host, a security plugin or a protection service thinks one visitor sent too many requests in a short time. Wait a few minutes. If it keeps happening to real people, loosen the limit or allow their address.

If the numbers still do not add up, or you would like someone to read your logs and set up the rules, contact us and tell us what you are seeing.

Varun Dubey

Written by

Varun Dubey

Varun Dubey runs Wbcom Designs, the WordPress studio he founded in India in 2009. He has spent sixteen years building on WordPress and BuddyPress, shipping client work and products such as Reign, BuddyX, Jetonomy and MediaVerse, and has been putting Claude and OpenAI workflows into production since 2023. He writes up what the studio learns along the way.

More about Varun

No comments yet