First, identify the kind of bot problem
A practical anti-bot request flow
I prefer to stop obvious abuse as early as practical, then let deeper layers make decisions that require more context.
Cloudflare can challenge or block traffic patterns at the edge. Turnstile can help distinguish automated form interactions without forcing every visitor through an old-style puzzle. Server-side validation verifies that required fields and security tokens are valid. WordPress or anti-spam tools can apply application-specific checks.
Protect forms at more than one layer
A hidden field alone is not enough. JavaScript alone is not enough. Client-side required attributes are not enough because a bot can send an HTTP request without using your visible form at all.
Use Cloudflare for the traffic it can see
Cloudflare is well placed to reduce scanners, abusive request rates and clearly unwanted paths before they consume WordPress resources. Part 4 covers the firewall strategy in detail.
But remember Part 3: an edge firewall protects only traffic that passes through the edge. If the origin accepts direct traffic, investigate whether that route can be restricted.
What WordPress security tools add
Application-level security can see details Cloudflare may not: WordPress usernames, failed authentication, plugin files, changes and application events. Tools such as Wordfence can therefore complement edge protection. Dedicated anti-spam services can evaluate form/comment submissions using their own signals.
Avoid installing several overlapping security plugins that all attempt to control the same login, firewall and file-monitoring features. Overlap can make troubleshooting harder and may add unnecessary load.
Rate limiting needs realistic thresholds
A human visitor may load many assets quickly, a checkout can make several background requests, and an administrator can trigger bursts of AJAX. Rate limiting should focus on meaningful endpoints and abusive patterns rather than “more than X requests means bot.”
Start conservatively, review events and adjust. If you immediately choose a low threshold and a long block period, you may discover your best customer is the first person you block.
Do not break legitimate search crawling
User-agent strings can be forged, so do not blindly allow anything calling itself Googlebot. Where your edge provider supplies verified-bot signals, use them appropriately. Also keep robots.txt separate in your mind: robots directives tell cooperative crawlers what you prefer; they do not function as an access-control firewall.
How to read the noise
Seeing thousands of blocked requests can look alarming. Often it means the controls are working. Focus on outcomes: Is CPU still being consumed? Are spam messages still arriving? Are legitimate forms failing? Are suspicious requests reaching WordPress despite an edge rule? Did an administrator login succeed unexpectedly?
Common questions
Can I eliminate all spam?
Probably not without also creating friction for legitimate visitors. The practical goal is to reduce spam to a manageable level while preserving usability.
Do I need both Cloudflare and an anti-spam plugin?
They solve different parts of the problem. Cloudflare acts before the origin for traffic routed through it; application anti-spam can evaluate the submission itself.
Is every cloud-hosted IP malicious?
No. Major cloud providers host countless legitimate services. Judge the request behaviour and context rather than assuming the infrastructure owner is the attacker.
Next: make sure WordPress email actually arrives
Part 8 follows another business-critical path: what happens after WordPress needs to send a password reset, contact-form notification or order email.
