WordPress Bot Protection: A Practical Setup Guide
Most bot advice starts with blocking, which is the step most likely to hurt you. Here is the order we use on our own sites: measure, harden, filter, and leave good crawlers alone.
On this page
- Step 1: Measure Your Bot Share First
- Step 2: Decide Which Bots You Actually Want
- Step 3: Harden the Endpoints Bots Actually Hit
- Step 4: Let the Edge Absorb the Cheap Volume
- Step 5: Filter What Gets Through, Because Blocking Is Not Measuring
- Step 6: The Moves That Cost You Real Readers
- Step 7: The Order That Works
Effective WordPress bot protection runs in a specific order: measure first, harden second, filter third. Most guides open with blocking rules, which is the step most likely to backfire, because until you check properly the crawler you depend on for search looks exactly like the scraper you want gone. Work in order and you cut wasted server load, keep Googlebot welcome, and end up with visitor numbers that describe people rather than scripts.
Here is the setup step by step, including the parts most guides skip: what to look at before you touch a firewall rule, and what to do about the bots that get through anyway.
Step 1: Measure Your Bot Share First
You cannot defend against traffic you have never seen separated out, and the right response depends entirely on the split. On one of our affiliate sites, a 30-day window logged 9,490 human visitors against 12,870 bot hits, so about 58% of everything that arrived was automated. A small store we run came out far more lopsided: 11 human visitors over the same period against roughly 2,770 bot hits.
Those two sites need different answers. The first has a real audience to protect and a noise problem to filter out of its reports. The second is being crawled far more than it is read, so the priority is keeping the load off a small server. You only know which situation you are in once the numbers are split, which is the whole argument for measuring before you write a single rule. The signals behind that split are covered in bot traffic vs real visitors, and the scale of the problem across the web is in what percentage of traffic is bots.
Step 2: Decide Which Bots You Actually Want
Not every bot is a threat. Search crawlers index you, uptime monitors warn you when you are down, and your own tools (backups, link checkers, update servers) need access. Block those and you break things you depend on.
The traffic worth stopping is everything else: scrapers lifting your content, scanners probing for vulnerable plugin files, credential stuffing against your login form, and spam tools hunting comment boxes.
The catch is that a user agent is a claim, not proof. Any script can send a string that says Googlebot. Google publishes two ways to check: a reverse DNS lookup that must resolve to googlebot.com, google.com or googleusercontent.com and then resolve forward to the same IP, or matching the request against Google’s published crawler IP ranges. Verify before you allow, and verify before you block.
Step 3: Harden the Endpoints Bots Actually Hit
Automated traffic is not spread evenly across your site. It piles onto a short list of URLs: wp-login.php, xmlrpc.php, comment and search forms, author enumeration URLs, and the file paths of plugins with known vulnerabilities.
That short list is what makes the work manageable. Rate-limit failed logins and add two-factor authentication for admin accounts. Turn off XML-RPC if nothing you run needs it, and check first, because some mobile and remote publishing tools still use it. Put a honeypot field or a challenge on public forms rather than on whole pages. Above all, keep plugins and themes updated: most scanner traffic is shopping for versions that were patched months ago. The WordPress project’s own hardening guide is worth working through once, properly.
Step 4: Let the Edge Absorb the Cheap Volume
Anything you can turn away before PHP starts is free performance. A CDN or firewall layer in front of WordPress, whether that is Cloudflare, your host’s WAF, or both, sheds a lot of low-effort traffic without your server waking up. The free tiers are genuinely useful here: they challenge clients that match known bot patterns, and cheap bots do not hang around to solve challenges.
Know the trade-off before you switch everything on. Those challenges target anything that does not behave like a browser, which includes legitimate non-browser clients, so API calls, mobile apps and monitoring tools can end up caught in the net. Enable it, then verify your own tooling still works.
Step 5: Filter What Gets Through, Because Blocking Is Not Measuring
Blocking and filtering solve different problems and neither replaces the other. Blocking changes what reaches your server. Filtering changes what counts as a visitor. A bot that sails past your edge rules still lands in your analytics as a session, a pageview, and sometimes a click.
This is where a browser-only tracker struggles: it records whatever ran its script and has little to check that against. DevDome Analytics classifies every hit server-side on six signals: verified user agent, missing browser profile, automation flags, script user agents, datacenter networks, and known scanners. Human and bot totals stay separate and visible, so you can look at either, and plans are metered on human pageviews only, so a scraper never inflates your bill.
If you monetize with affiliate links, that separation pays twice. Bot clicks inflate exactly the report you would use to decide which links deserve attention, and they sit right next to links that are quietly dead, so finding and fixing broken affiliate links is the natural other half of the same cleanup.
Step 6: The Moves That Cost You Real Readers
Some popular tactics do more damage than the bots do. Blocking whole countries or hosting networks catches VPN users and travelers who were genuinely reading you. Sitewide CAPTCHAs slow down every visitor to inconvenience scripts that frequently solve them anyway. Blocking on a user agent substring eventually swallows a crawler you wanted to keep.
There is a quieter mistake too: treating a security plugin’s blocked-attempt counter as an audience metric. It tells you what was stopped, not what your traffic looked like. And junk that never touched your server at all, such as referral spam in your reports, is a measurement problem no firewall can solve.
Step 7: The Order That Works
Put together, the sequence is short. Measure the split. Decide which bots you want. Harden the handful of endpoints that actually get hit. Push the cheap volume out to the edge. Filter whatever is left out of your numbers. Start narrow and widen only where the evidence supports it, then re-check the split a month later to see what really changed.
That last step is the one people skip. Bot protection is not a configuration you finish, it is a number you watch, and it moves. If your number is currently unknown, that is the first thing to fix; every decision after it gets easier to judge. Our plans and pricing start with a free tier if you want to see your own split before you spend anything.
Disclosure: DevDome publishes this blog and makes the products it mentions. We describe what they do rather than promise results.
Key takeaways
- Measure your bot share before you block anything; you cannot defend against traffic you have never seen split out.
- A user agent is a claim, not proof: verify Googlebot by reverse DNS or Google's published IP ranges.
- Bots concentrate on a few predictable endpoints, mainly login, XML-RPC, and comment or search forms.
- Blocking changes what reaches your server; filtering changes what counts as a visitor. You want both, in that order.
- Aggressive blocking costs you real readers, so start narrow and widen only where the evidence supports it.
Sources
- Google Search Central: verifying Googlebot and other Google crawlers — reverse DNS check and the published crawler IP range lists
- WordPress: Hardening WordPress — the project's own guidance on protecting admin, files and logins
- Cloudflare docs: Bot Fight Mode — what the free edge bot layer does and cannot be configured to do
Links last checked August 12, 2026.
Frequently asked questions
Will bot protection block Google?
Not if you verify crawlers properly. Googlebot can be confirmed with a reverse DNS lookup that resolves to googlebot.com, google.com or googleusercontent.com and then resolves back to the same address, or by matching the request against Google's published crawler IP ranges. Blocking on user agent text alone is what puts real crawlers at risk, because any script can claim to be Googlebot.
Is a security plugin enough on its own?
A security plugin covers the attack side well: login limits, firewall rules, file change monitoring. What it does not do is tell you what share of your traffic was automated, because its counters describe blocked attempts rather than visitors. Pair it with analytics that classify every hit as human or bot.
Should I put a CAPTCHA on every page?
No. CAPTCHAs earn their place on forms that get abused, such as comments, registration and checkout. Sitewide challenges tax every real reader to inconvenience scripts that often get through anyway, and the cost lands on the people you actually want.
Do bot hits use up my analytics plan?
In DevDome Analytics they do not, because plans are metered on human pageviews only, so a scraper hammering your site never pushes you into a bigger plan. It is worth checking with any tool you use, since some meter every hit they record regardless of what produced it.