
How to Block AI Crawlers in nginx, Apache and Cloudflare
Copy-paste configs to block GPTBot, ClaudeBot, CCBot and other AI crawlers in nginx, Apache .htaccess and Cloudflare WAF, and how to test that they work.
tutorialUse MainWP to install WebDecoy on one staging site, verify local bot and AI traffic reporting, then roll it out to approved WordPress sites.
Use MainWP to install WebDecoy on a staging site, then inspect bot and AI traffic in that site’s WordPress admin. The plugin starts in monitor mode, and its free local reports need no account or API key. You can check what reaches WordPress before deciding whether to roll the plugin out to more sites.
Download WebDecoy from WordPress.org or explore the dashboard with sample data.
MainWP publishes the ZIP upload workflow in its child plugin update guide. For a first install of WebDecoy, activation is the relevant option. The update guide also describes overwriting a plugin when replacing an existing installation.
Open WebDecoy → AI Traffic & Analytics on the child site. The crawler report shows recognized requests that reached WordPress. The referral report shows identifiable visits sent by AI assistants. Check the reports separately when a client asks whether an assistant is reading the site or sending people to it.

Load a normal page and check the login, form, or checkout flows relevant to that site. Leave enforcement off while you establish a baseline. An upstream cache can serve pages before WordPress sees the request, so note the active proxy and cache configuration when interpreting a quiet report.
We maintain WebDecoy. We set up MainWP Dashboard 6.5 and two disposable sites with MainWP Child 6.5. The Dashboard installed and activated the official WebDecoy 2.16.1 ZIP on both sites. Both started with empty reports and no WebDecoy API key.
We sent one synthetic crawler request and one synthetic AI referral visit to the first site. Both returned HTTP 200. Its local report recorded one crawler request and one referral. The second site’s two counters stayed at zero. This verified local reporting in that setup using test requests. Your results depend on the traffic that reaches each site.
Let the staging site run for a week. Note the date window, WebDecoy version, monitor-mode status, and the crawler and referral counts separately. If you have approval to expand, select a small batch of approved child sites in MainWP. Confirm activation and open the local report on each one.
Cloud reporting is optional. Before using it for a client report, have an authorized admin connect that specific site with its API key, confirm the intended WebDecoy organization, and verify an incoming test observation there.
Get the free plugin · Open the installer for a single WordPress site

Copy-paste configs to block GPTBot, ClaudeBot, CCBot and other AI crawlers in nginx, Apache .htaccess and Cloudflare WAF, and how to test that they work.
tutorial
Copy-paste robots.txt rules to block GPTBot, ClaudeBot, CCBot and other AI crawlers, how to add them in WordPress, and how to stop bots that ignore them.
tutorial
Create an llms.txt file for WordPress that lists your best pages for AI tools, keep it current automatically, and see which AI crawlers fetch it.
tutorialLike this post? Share it with your friends!
Get a personalized demo from our team.