by EncodeDotHost on WordPress.org
A smart WordPress plugin that automatically blocks malicious bots and crawlers that ignore your site's robots.txt file.

Allow list management
EDH Bad Bots is an intelligent bot detection and blocking system that protects your WordPress site from unwanted crawlers and malicious bots. Unlike traditional blocking methods that rely on user agent strings (which can be easily spoofed), this plugin uses a honeypot technique to identify and block bots that don’t respect your site’s robots.txt directives.
.htaccess blocking AND PHP-level blocking for maximum effectiveness.htaccess blocking (Apache) or PHP-only blocking (Nginx compatible)The plugin implements a sophisticated honeypot system:
Disallow rule for the trap URLAccess the plugin dashboard at Tools > Bad Bots in your WordPress admin:
.htaccess Blocking: Enable/disable server-level IP blocking via .htaccess file.htaccess blocking options.htaccess blocking) or Nginx (PHP-only blocking).htaccess file (if using Apache server-level blocking)The plugin creates two custom database tables:
wp_edhbb_blocked_bots: Stores blocked IP addresses with expiration dates and hostnameswp_edhbb_whitelisted_ips: Stores permanently whitelisted IP addressesThe plugin includes an advanced DNS lookup system:
The plugin offers two blocking approaches:
.htaccess).htaccess file with unique markers.htaccess is unavailablemanage_options capability can access admin features.htaccess Management: Uses unique markers and automatic cleanup.htaccess blocking prevents blocked requests from reaching PHP.htaccess rules automaticallyplugins_loaded: Plugin initializationinit: Early request blocking checktemplate_redirect: Bot trap detectionwp_footer: Hidden link injectionadmin_menu: Admin page registrationedhbb_update_hostnames_cron: Background hostname resolutionrobots_txt: Adds disallow rule to robots.txt`
edh-bad-bots/
├── admin/
│ └── views/
│ └── admin-display.php # Admin interface HTML
├── assets/
│ ├── css/
│ │ └── admin-style.css # Admin page styling
│ └── js/
│ └── admin-script.js # Admin page JavaScript
├── includes/
│ ├── class-edhbb-admin.php # Admin functionality
│ ├── class-edhbb-blocker.php # Bot detection and blocking
│ ├── class-edhbb-database.php # Database operations
│ └── class-edhbb-dnslookup.php # DNS/PTR lookup system
├── edh-bad-bots.php # Main plugin file
├── LICENSE
└── readme.txt
`
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GPL v3 or later.
EncodeDotHost
– Website: https://encode.host
– GitHub: @EncodeDotHost
For support, please visit https://encode.host or create an issue on the GitHub repository.