About this plugin
htaccess rules. 100% local.
AI companies crawl your content to train models and to answer questions in AI search, while ChatGPT, Perplexity and other assistants send you real human visitors. AI Bot Radar shows you both sides in one dashboard, so you can opt out of AI training without disappearing from AI answers. Everything runs inside your WordPress install: no accounts, no external API calls, no telemetry, no CDN assets.
AI crawler detection and logging
- Recognises the major AI crawlers and agents, each labelled with its vendor and purpose: Training, Search, Assistant or Fetcher.
- Covers OpenAI (GPTBot, OAI-SearchBot, ChatGPT-User), Anthropic (ClaudeBot, Claude-SearchBot, Claude-User and legacy tokens), Perplexity, Google (Google-Extended, GoogleOther), Apple (Applebot-Extended), Meta, ByteDance, Common Crawl, Amazon, Cohere, DuckDuckGo, Mistral and Diffbot.
- Bots are recognised by the User-Agent they announce (self-identified). Requests from everyone else cost a quick User-Agent check and never write to the database.
- The real HTTP status is logged, including redirects and 404s. robots.txt and favicon.ico fetches are not counted as visits.
- Old data is pruned automatically every day (keep 7, 30 or 90 days) in small batches, with a hard cap of 100,000 stored events that is also enforced between cron runs.
AI human referral counter
- Counts real people who click through to your site from ChatGPT, Perplexity, Claude, Gemini, Microsoft Copilot, DeepSeek, Mistral Le Chat, Meta AI, You.com, Phind, Kagi Assistant and Grok.
- Uses the HTTP Referer (exact domain or real subdomain match only) and utm_source=chatgpt.com / utm_source=perplexity.ai tags.
- Logged-in users and HEAD requests are never counted, so your own browsing does not inflate the numbers.
Per-bot allow / block controls
- Switch any AI bot between Allow and Block, or use the presets: Block Training Bots Only (recommended), Allow All, Block All.
- Blocked bots get a clean User-agent: <token> / Disallow: / rule in the robots.txt that WordPress generates, with a live preview and a Copy button.
- Optional: send HTTP 403 Forbidden to blocked bots that reach PHP (off by default). This covers pages, feeds, the REST API and wp-login.php.
- For cached sites: copy-paste User-Agent block rules for Cloudflare WAF (custom rule expression), Apache (.htaccess) and Nginx, generated live from the bots you block.
Dashboard
- 7-day / 30-day KPI cards, a daily activity chart in your site’s timezone (with separately scaled Bots / Referrals views so small referral numbers stay readable), breakdowns by bot and by referral source, top crawled paths and top AI-referred pages.
- A filterable, paginated log of recent events.
- A “Last 7 Days” widget on the WordPress Dashboard with AI crawler hits, human AI referrals and the top sources.
- An AI Bot Radar section under Tools > Site Health > Info for support requests.
A note on robots.txt control tokens
txt control tokens only. Google and Apple crawl with their normal crawlers and use these tokens to decide whether your content may be used for AI training. txt rule.
txt control token" in the plugin.
Privacy
AI Bot Radar stores no IP addresses and no data that identifies a person.
- For human AI referrals it stores only the referral source, the request path without its query string, the HTTP status and the time. No User-Agent, no IP, no cookie.
- For AI crawlers it additionally stores the crawler’s self-reported User-Agent.
- It makes no outgoing HTTP requests of any kind.
- Suggested privacy policy text is added under Settings > Privacy.
Multisite
Network activation sets up every site, and sites created later are set up automatically. Each site has its own events table and settings, and each site is configured separately (there is no network-wide policy screen). txt rules on the main site; HTTP 403 enforcement works on every site.
Uninstalling cleans up every site that has “delete all data on uninstall” enabled.
For developers
- aibr_bots filters the bot registry. Each entry is keyed by a slug and needs a token; optional vendor, category (training, search, assistant, fetcher), robots_only, legacy, user_initiated.
- aibr_referrals filters the referral sources: label, hosts, optional path prefix and utm values. Browsers send only the origin as a cross-site referrer by default, so a path rule rarely matches real visitors.
- aibr_row_cap (default 100000, applied to AI crawler visits and AI referrals separately) and aibr_cap_check_chance (default 500, i.e. 1 in 500 inserts) tune the storage cap.
- aibr_event_logged (action) fires after each event is stored, with the stored row and its id.
- aibr_should_block filters the HTTP 403 decision for a matched bot ( $block, $bot_slug, $path, $settings ). robots.txt is always served.
- aibr_admin_tabs adds admin tabs (slug => label); render each one on the aibr_render_tab_{slug} action.
Add the registry filters before plugins_loaded (for example in an mu-plugin), because detection runs early.