RevealTheme logo
Back to Blog

WordPress And Bot Traffic Filtering

WordPress And Bot Traffic Filtering
The RevealTheme Team

By

··3 min read

Bot traffic constitutes a significant fraction of web traffic. Some bots are legitimate (search engine crawlers, monitoring services); some are malicious (scrapers, attack bots); some are noise (random web crawlers).

Filtering bots from analytics and blocking malicious bots reduces noise and stress.

The analytics filtering

Google Analytics offers a "bot filtering" option in admin settings. Enabling it removes known bot traffic from reports.

The filtering uses Google's bot list. It catches most known bots but not all.

For sites where bot traffic significantly skews analytics, the filtering is essential. Without it, the analytics shows inflated numbers that don't represent real users.

The blocking via Cloudflare

Cloudflare offers bot management at various tiers. Free tier includes basic bot detection; paid tiers add more sophisticated filtering.

The blocking happens at the edge before requests reach your origin. Server resources are protected.

The good bot allowlist

Some bots are legitimate and should be allowed:

Search engine crawlers (Googlebot, Bingbot, etc.).

Uptime monitoring services (UptimeRobot, Pingdom).

Legitimate analytics or research services.

Bot management tools usually have built-in allowlists. The configuration ensures legitimate bots aren't blocked.

The user-agent based blocking

Simple bot blocking can use user agent strings. Add rules to .htaccess or server configuration to block known malicious user agents.

The pattern is reactive: identify problematic bots, add them to the blocklist.

More sophisticated bots fake user agents; the simple blocking doesn't catch them.

The behavioral detection

Behavioral bot detection looks at request patterns: too fast for a human, unusual access patterns, no JavaScript execution.

Tools like Cloudflare Bot Fight Mode use behavioral signals. The detection catches bots that bypass simple filtering.

The honest framing

Bot traffic is unavoidable but manageable. The filtering and blocking reduce noise and stress.

For sites that haven't addressed bot traffic, the audit usually reveals significant unfiltered bot activity. The improvements are worth doing.