Blackhole for Bad Bots

plugin banner

Protect your site against bad bots by trapping them in a virtual blackhole.

Author:Jeff Starr (profile at wordpress.org)
WordPress version required:4.1
WordPress version tested:5.8
Plugin version:3.2
Added to WordPress repository:18-02-2016
Last updated:19-07-2021
Rating, %:98
Rated by:118
Plugin URI:https://perishablepress.com/blackhole-bad-bot...
Total downloads:319 642
Active installs:30 000+
plugin download
Click to start download

Add your own virtual black hole trap for bad bots.

Bye bye bad bots..

Bad bots are the worst. They do all sorts of nasty stuff and waste server resources. The Blackhole plugin helps to stop bad bots and save precious resources for legit visitors.

How does it work?

First the plugin adds a hidden trigger link to the footer of your pages. You then add a line to your robots.txt file that forbids all bots from following the hidden link. Bots that then ignore or disobey your robots rules will crawl the link and fall into the trap. Once trapped, bad bots are denied further access to your WordPress site.

I call it the “one-strike” rule: bots have one chance to obey your site’s robots.txt rule. Failure to comply results in immediate banishment. The best part is that the Blackhole only affects bad bots: human users never see the hidden link, and good bots obey the robots rules in the first place. Win-win! ????

Using a caching plugin? Check out the Installation notes for important info.

Features

  • Easy to set up
  • Squeaky clean code
  • Focused and modular
  • Lightweight, fast and flexible
  • Built with the WordPress API
  • Works with other security plugins
  • Easy to reset the list of bad bots
  • Easy to delete any bot from the list
  • Regularly updated and “future proof”
  • Blackhole link includes “nofollow” attribute
  • Plugin options configurable via settings screen
  • Works silently behind the scenes to protect your site
  • Whitelists all major search engines to never block
  • Focused on flexibility, performance, and security
  • Email alerts with WHOIS lookup for blocked bots
  • Complete inline documentation via the Help tab
  • Provides setting to whitelist any IP addresses
  • Customize the message displayed to bad bots ????
  • One-click restore the plugin default options
  • Does NOT use or require any .htaccess rules

Blackhole for Bad Bots protects your site against bad bots, spammers, scrapers, scanners, and other automated threats.

Not using WordPress? Check out the standalone PHP version of Blackhole!

Check out Blackhole Pro and level up with advanced features!

Whitelist

By default, this plugin does NOT block any of the major search engines (user agents):

  • AOL.com
  • Baidu
  • Bingbot/MSN
  • DuckDuckGo
  • Googlebot
  • Teoma
  • Yahoo!
  • Yandex

These search engines (and all of their myriad variations) are whitelisted via user agent. So are a bunch of other “useful” bots. They always are allowed full access to your site, even if they disobey your robots.txt rules. This list can be customized in the plugin settings. For a complete list of whitelisted bots, visit the Help tab in the plugin settings (under “Whitelist Settings”).

Privacy

User Data: This plugin automatically blocks bad bots. When bad bots fall into the trap, their IP address, user agent, and other request data are stored in the WP database. No other user data is collected by this plugin. At any time, the administrator may delete all saved data via the plugin settings.

Services: This plugin does not connect to any third-party locations or services.

Cookies: This plugin does not set any cookies.

Header Image Courtesy NASA/JPL-Caltech.

Support development of this plugin

I develop and maintain this free plugin with love for the WordPress community. To show support, you can make a donation or purchase one of my books:

And/or purchase one of my premium WordPress plugins:

Links, tweets and likes also appreciated. Thanks! ????


Screenshots
FAQ
ChangeLog