Every WordPress site receives a constant stream of automated traffic. Some of it is essential, such as search engine crawlers. Much of it is not: scrapers, vulnerability scanners, credential stuffers and bots that request junk URLs. The difficulty is telling them apart without accidentally blocking the traffic you need.
Why the user agent proves nothing
A user agent string is just text the client chooses to send. Any script can claim to be Googlebot, Bingbot or a social media crawler. Bots impersonate well-known crawlers precisely because many sites allow them through.
How crawler verification works
Google documents a verification method that works for its crawlers, and other major search engines publish similar guidance:
- Reverse DNS lookup on the requesting IP address. A genuine Googlebot IP resolves to a hostname under
googlebot.com,google.comorgoogleusercontent.com. - Forward DNS lookup on that hostname. It must resolve back to the same IP. Without this step, an attacker controlling their own reverse DNS could fake the hostname.
- Or match against published IP ranges. Google also publishes its crawler IP ranges as JSON files, which can be checked automatically.
Do the lookups once and cache the result per IP; don’t run DNS checks on every request.
Signals beyond the user agent
- Network context: IP and ASN. Traffic from data-centre networks claiming to be a home browser deserves a closer look.
- Behaviour: request rate, paths requested, whether assets load, and whether the pattern looks like a person reading pages.
- Targets: repeated hits on
/wp-login.php,xmlrpc.phpor plugin paths that don’t exist on your site are classic probing.
What URL pollution looks like
URL pollution is when bots request your pages with junk query strings or fabricated paths, for example random parameters appended to real URLs. Problems it can cause:
- Search engines discovering endless URL variations, which can waste crawl attention.
- Analytics cluttered with fake pages and sessions.
- Cache misses and extra server load, because every variation looks like a new page.
Sensible defences include canonical tags on every page, handling unknown parameters consistently, and monitoring for spikes in parameterised requests.
The paid-traffic angle
If you run paid campaigns, bot clicks and junk sessions distort the data you use to judge them. Logging traffic quality against campaign landing pages helps you separate real performance from noise and gives you evidence to work with.
Observe before you block
The fastest way to hurt a site is an aggressive firewall rule that blocks a legitimate crawler, payment callback or integration partner. A safer sequence:
- Observe: record and classify traffic for a period without enforcing.
- Verify: confirm which crawlers and partners are genuine.
- Decide: write policy based on evidence: allow, challenge or block.
- Retain evidence: keep enough context to investigate false positives.
This is the approach behind BotExorcist, our WordPress traffic intelligence and protection product, with Observation Mode before Protection Mode. For custom requirements, see security development.
Frequently asked questions
How do I check if Googlebot is real?
Do a reverse DNS lookup on the IP (it should end in googlebot.com, google.com or googleusercontent.com), then a forward lookup on that hostname to confirm it resolves to the same IP, or check the IP against Google’s published ranges.
Is blocking all bots a good idea?
No. Search engine crawlers, uptime monitors and integrations are bots too. Observe and verify first, then block based on evidence.
What is URL pollution?
Bots requesting your URLs with junk parameters or fabricated paths, which can clutter analytics, add server load and create endless URL variations.