Installation
Get Bothammer running on your WordPress site in under five minutes.
Download the plugin
Download the latest .zip file from your License Portal. Always download from here โ never from a third-party source, as redistributed copies may be modified.
Install in WordPress
- In your WordPress admin, go to Plugins โ Add New โ Upload Plugin
- Choose the
bothammer.zipfile you downloaded - Click Install Now, then Activate Plugin
- A new Bothammer menu item will appear in your sidebar
What gets installed
Bothammer creates its own database tables on activation and writes an entry to your .htaccess file for the three-tier blocking system. Depending how large you set your blacklist too, this can be quite a few entries, but that's perfectly fine. It also registers several WordPress cron jobs for background syncing. We write to our plugin directory and the mu-plugin/bothammer-cache directory.
Quick Start
The fastest path from installation to active protection.
Activate your license
Go to Bothammer โ Settings โ License and paste your license key. Click Activate. Your plan, features, and seat count are fetched from the license server and cached locally.
Set protection mode
Go to Bothammer โ Settings โ Protection and choose a mode. Stay in passive for a while, nothing will be blocked without your express permission. You will have full control, and actually, a lot of customers like it that way. Move on to Moderate once you are ready โ it will use your blacklist threshold to block bots, but it will only "soft" block them, and never get added to the blacklist (great for always getting the latest threat markers) and also never get added to the nftables firewall, if you have that installed.
And if you sure you want to move to Aggressive mode, go for it. It will do all the above, hands free. Just setup Bothammer once, your cleaning schedule, your threshold, your email and calendar preferences, and it's hands off from there.
Watch the Bot Jail
Go to Bothammer โ Bot Lists and watch bots arrive in real time. Within minutes of installation on any live WordPress site you will see entries. Review the threat reasons to understand what is hitting you before changing any settings.
Enable the Intelligence Feed
If you have a Pro or Agency licence, go to Bothammer โ Settings โ Intelligence Feed and toggle it on. Your blocked IPs start uploading to the shared network, and community IPs start downloading to your blacklist automatically every 5 minutes.
Connect your WAF
Go to Bothammer โ Settings โ WAF Sync and add your Cloudflare API token or AWS credentials. Enable auto-sync. Your blacklist will push to the cloud WAF on every update, closing the feedback loop.
Requirements
What you need before installing Bothammer.
| Requirement | Minimum | Recommended |
|---|---|---|
| WordPress | 5.8 | 6.x latest |
| PHP | 7.4 | 8.2+ |
| MySQL / MariaDB | 5.7 / 10.3 | 8.0 / 10.6+ |
| Web server | Apache (mod_rewrite) | Apache with .htaccess support |
| Outbound HTTPS | Required | Required for Feed + WAF sync |
Optional but recommended
- nftables โ for kernel-level IP blocking (Linux only). If not present, Bothammer falls back to .htaccess blocking and logs a non-fatal error.
- API keys โ AbuseIPDB, IPinfo.io, MaxMind, VirusTotal, Greynoise, or Shodan for enriched IP intelligence. Free tiers on most services are sufficient for low-to-medium traffic sites.
- Cloudflare or AWS account โ for WAF auto-sync.
Activating Your License
Your license key unlocks features and connects you to the Intelligence Feed.
Where to find your key
Your license key was emailed to you immediately after purchase. It has the format BH-XXXX-XXXX-XXXX-XXXX. You can also retrieve it from the License Portal at any time.
Activating
- In WordPress admin go to Bothammer โ Settings โ License
- Paste your key into the license field
- Click Activate License
- Bothammer contacts the license server, verifies your key, registers your domain, and caches your plan details locally
- A green status indicator confirms activation โ your plan name and expiry date are shown
What activation does
On activation, Bothammer sends your domain and a randomly generated per-site secret to the license server. The secret is stored in Cloudflare KV and used to sign all future API requests with HMAC-SHA256. This means your license key never travels over the wire after the initial activation โ only signed requests do.
Deactivating a Domain
Free up a seat to move your license to a different site.
From the plugin
Go to Bothammer โ Settings โ License and click Deactivate. This removes your domain from the license server and frees the seat. The plugin continues running locally but the Intelligence Feed disconnects and Pro/Agency features are gated until you reactivate on a new domain.
From the License Portal
If you no longer have access to the WordPress admin (e.g. a site you are migrating away from), visit bothammer.com/portal, enter your license key, and click Deactivate next to the domain you want to remove.
Plan Features
What each plan unlocks.
| Feature | Starter | Pro | Agency |
|---|---|---|---|
| Sites | 1 | 3 | Unlimited |
| Bot detection & blacklisting | โ | โ | โ |
| WAF auto-sync | โ | โ | โ |
| Honeypot traps | โ | โ | โ |
| Geopolitical event map | โ | โ | โ |
| Time Machine | โ | โ | โ |
| CPU Guardian | โ | โ | โ |
| Intelligence Feed โ pull | Read only | โ | โ |
| Intelligence Feed โ send | โ | โ | โ |
| Malware scanner | โ | โ | โ |
| Abuse reporting | โ | โ | โ |
| Slack / Telegram / SMS | โ | โ | โ |
| Federation keys | โ | โ | โ |
How the Feed Works
Crowd-sourced bot intelligence shared across every Bothammer Pro and Agency installation.
The concept
When Bothammer blacklists an IP on your site, that IP is queued for upload to the shared Intelligence Feed โ a database hosted on Cloudflare's edge. Every five minutes, a background cron job uploads your queued IPs and downloads IPs that have been reported by other sites in the network.
Downloaded IPs are automatically added to your local blacklist. Bots that hit one site get blocked across the entire network within one sync cycle โ typically under 5 minutes.
Security model
Every API request to the Feed is signed with HMAC-SHA256 using a per-site secret generated at activation. The secret never leaves your server after setup. Requests without a valid signature are rejected by the Worker. Your domain is verified on every request โ a license activated on site-a.com cannot make requests claiming to be site-b.com.
What is shared
Only IP addresses, their country code, and ASN are shared. No URLs, no User-Agents, no visitor data, no content from your site. The Feed is a pure IP reputation list.
Setting Up the Feed
Enable the Intelligence Feed on a Pro or Agency licence.
Enable the feed
- Make sure your license is activated (the feed requires an active Pro or Agency licence)
- Go to Bothammer โ Settings โ Intelligence Feed
- Toggle Enable Intelligence Feed on
- Choose your mode: Send + Pull (recommended) or Pull only
- Save settings โ the first sync runs within 5 minutes
Verify it is working
Go to Bothammer โ Settings โ Intelligence Feed and check the Last sync timestamp. After the first successful sync you will see an Uploaded count and a Downloaded count. You can also check your debug log for lines like:
[INFO] Bothammer: uploaded 8 IPs [INFO] Bothammer: downloaded and applied 17 IPs
Federation Keys
Agency-only feature. Create a private intelligence ring between trusted sites.
What federation keys do
A federation key is a shared secret you set on multiple sites. Sites sharing the same federation key only exchange bot intelligence with each other โ not with the public feed. This is useful for agencies managing multiple client sites, or for organisations that want to share threat data internally without contributing to or receiving from the public network.
Setting up a federation key
- Go to Bothammer โ Settings โ Intelligence Feed on your Agency licence site
- Enter a federation key in the Federation Key field โ this can be any string, but treat it like a password
- Save settings
- Repeat on every other site you want in the same private ring, using the exact same key
Feed Settings Reference
All available settings for the Intelligence Feed.
| Setting | Description | Default |
|---|---|---|
Enable Feed | Master toggle for the Intelligence Feed | Off |
Send IPs | Upload your blocked IPs to the network | On (Pro/Agency) |
Pull only | Download community IPs but do not upload yours | Off |
Min sites | Only import IPs reported by at least N other sites | 2 |
Time window | Only import IPs reported within the last N minutes | 60 |
Country filter | Comma-separated ISO country codes to filter downloads (e.g. CN,RU,KP) | Empty (all) |
Federation key | Private ring key (Agency only) | Empty |
Protection Modes
Choose how aggressively Bothammer responds to suspicious traffic.
Monitor and log only. No bots are blocked or challenged. Use this when first installing to understand your traffic before taking action.
Rate-limits high-frequency IPs, challenges suspicious visitors with JS challenge or captcha, and auto-blacklists IPs that exceed the threshold score. Recommended starting point.
Blocks on first contact for high-score IPs, no challenge step. Use during active attacks or on sites with no legitimate automated traffic.
Threshold score
Each visitor accumulates a threat score based on their User-Agent, headers, IP reputation, request patterns, and behaviour. When the score crosses your configured threshold (default: 21), Bothammer takes action based on the current protection mode. You can adjust the threshold in Bothammer โ Settings โ Detection.
Blacklist & Whitelist
Manual control over who gets blocked and who gets through.
Blacklisting
Go to Bothammer โ Blacklist to add entries manually. You can blacklist by exact IP, CIDR range, ASN (e.g. AS13335), country code, User-Agent string, or request URI pattern. Bulk import is supported โ paste a list of IPs or upload a file exported from a Cloud WAF.
Whitelisting
Whitelisted entries are never blocked regardless of their threat score. Whitelist by IP, CIDR, ASN, or User-Agent. You can also whitelist with a secret URL parameter โ useful for giving trusted crawlers or monitoring services a pass without exposing your whitelist publicly.
The three-tier .htaccess system
Bothammer maintains up to 1,000 of your top-ranked IPs directly in .htaccess using Apache RewriteMap. IPs in the top 1,000 by hit count are blocked at the Apache level before PHP even starts โ zero CPU cost per blocked request. IPs outside the top 1,000 are still blocked by the PHP layer on first contact, then ranked up into the .htaccess tier as they accumulate hits.
WAF Sync
Push your Bothammer blacklist to Cloudflare WAF and AWS WAF automatically.
Cloudflare
- In Cloudflare, go to My Profile โ API Tokens โ Create Token
- Use the Edit Cloudflare Workers template, scoped to your zone
- Copy the token
- In Bothammer go to Settings โ WAF Sync โ Cloudflare
- Paste your API token and Zone ID, then enable auto-sync
AWS WAF
- Create an IAM user with
wafv2:UpdateIPSetandwafv2:GetIPSetpermissions - Create an IP Set in AWS WAF for Bothammer to manage
- In Bothammer go to Settings โ WAF Sync โ AWS WAF
- Enter your Access Key ID, Secret, region, and IP Set ARN
Notifications
Get alerted on Slack, Telegram, SMS, voice call, Home Assistant, or email.
Go to Bothammer โ Settings โ Notifications to configure channels. Each channel can be toggled independently and scoped to specific event types.
| Channel | Use case |
|---|---|
| Hourly digests, daily summaries, or realtime alerts | |
| Slack | Team channel alerts for high attack rates or new blacklists |
| Telegram | Personal alerts when you are not at your desk |
| Twilio SMS | Critical alerts โ CPU threshold, site down, severe attack |
| Twilio Voice | Phone call for the most critical events |
| Home Assistant | REST sensor integration โ see the docs for example automations |
CPU Guardian
Protect your server when bot traffic pushes CPU above safe thresholds.
CPU Guardian runs as a background systemd service that monitors CPU load and takes configurable action when your threshold is exceeded. The default threshold is 15%.
Available actions
- Monitor only โ log the event and send a notification, take no further action
- Suspend HTTPD โ temporarily bring down the web server for a configurable hold-down period
- Shutdown HTTPD โ permanently stop the web server until you manually restart it
- Close public interface โ block external traffic while keeping internal access alive
- Execute custom script โ run any script you specify; possibilities are unlimited
- Send notification only โ alert you and do nothing else
Honeypot Traps
Invisible links that only bots follow โ instant identification with zero false positives.
How it works
Bothammer injects a hidden link into your page HTML using CSS display:none. Real human visitors never see or click it. Any automated crawler that follows links indiscriminately will hit the trap URL, immediately identifying itself as a bot. Bothammer blacklists the IP on contact.
Enable honeypots
- Go to Bothammer โ Settings โ Honeypot
- Toggle Enable Honeypot Traps on
- Optionally customise the trap URL pattern
- Save โ the trap link is injected automatically into your theme's footer
nftables Error
Failed to add IP to nftables blacklist: No such file or directory.
What this means
This error appears in your log when Bothammer tries to add an IP to the kernel-level nftables blacklist but the nftables table or set does not exist on your server. It is a non-fatal error โ .htaccess and PHP-level blocking still work normally.
[ERROR] Failed to add IP 82.21.248.218 to nftables blacklist: Error: No such file or directory
add element inet filter blacklist { 82.21.248.218 timeout 3600s }
^^^^^^^^^
Fix: create the nftables table and set
Run these commands on your server as root. This creates the permanent inet filter table with a blacklist set that Bothammer expects.
nft add table inet filter
nft add set inet filter blacklist { type ipv4_addr \; flags timeout \; }
nft add rule inet filter input ip saddr @blacklist drop
nft-save # or: nft list ruleset > /etc/nftables.conf
If nftables is not installed on your server at all, either install it (apt install nftables) or disable the nftables sync in Bothammer โ Settings โ Firewall to suppress the error.
.htaccess Limits
Understanding the top-1000 .htaccess limit and what happens to IPs outside it.
Bothammer writes up to 999 IPs to your .htaccess file ranked by hit count. When you see a log line like:
[WARNING] โ Triggering IP 87.236.176.53 EXCLUDED from .htaccess (not in top 1000 (active-only mode))
This means the IP was blacklisted and added to your database, but it did not have enough hit count to displace an existing top-1000 entry in .htaccess yet. It is still blocked โ by PHP on its next request. Once it returns and accumulates hits, it will rank into the .htaccess tier automatically.
This is by design. Putting thousands of IPs in .htaccess would make the file enormous and slow Apache's startup. The top-1000 tier covers your most persistent attackers at zero PHP cost; everything else is caught by PHP before it can cause damage.
License Issues
Common license activation problems and how to fix them.
| Error | Cause | Fix |
|---|---|---|
| License not found | Key typed incorrectly | Copy-paste directly from your email or the portal |
| License already active on domain: x.com | Key is in use on another domain | Deactivate from the other domain via the portal first |
| Seat limit reached | All seats are in use | Deactivate an unused domain or upgrade your plan |
| License inactive | Subscription expired or cancelled | Renew at bothammer.com/pricing |
| Domain mismatch | WordPress home_url does not match the activated domain | Check your WordPress URL in Settings โ General |
If none of the above apply, email [email protected] with your license key and the exact error message.
Feed Not Syncing
The Intelligence Feed sync timestamp is not updating.
Check the cron is running
The feed sync runs via WordPress cron every 5 minutes. If your server does not have a real cron job calling wp-cron.php and your site has low traffic, WordPress cron may not fire reliably. Add a real system cron job:
*/5 * * * * curl -s https://yoursite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
Check your license is active
The feed will not sync if the license is not active or if Bothammer activation has not been run. Check Bothammer โ Settings โ License.
Check outbound HTTPS
The feed requires outbound HTTPS to your Cloudflare Worker URL. Some hosting environments block outbound requests. Check with your host, or look for curl errors in your debug log.
False Positives
A legitimate visitor or service is being blocked.
Identify the blocked IP
Go to Bothammer โ Bot Jail and search for the IP or User-Agent. The Threat reason column shows exactly which signals contributed to the score.
Whitelist the IP
Go to Bothammer โ Whitelist โ Add Entry and add the IP, CIDR range, or ASN. Whitelisted entries are never blocked regardless of score.
Adjust the threshold
If you see a pattern of legitimate services being caught at a score just above your threshold, raise the threshold slightly in Bothammer โ Settings โ Detection. Common legitimate services that score higher than expected: monitoring tools, uptime checkers, and corporate proxies that strip browser headers.