=== BadBot Protection for WordPress ===
Contributors: siteguarding
Tags: bot protection, block bots, anti scraping, spam bots, ai crawlers
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 5.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Stop scanners, scrapers, spam bots and fake Googlebots with a browser check that runs on your own server. Real visitors and good bots pass as usual.

== Description ==

Most of the traffic of a typical website is bots: vulnerability scanners looking for holes, scrapers copying your content and prices, spam bots filling your forms, password guessers on the login page. BadBot Protection tells them apart from people and from the good bots you want, and stops them before they cost you server time.

Everything runs on your server. No account, no connection to an outside service, and no visitor data leaves your website.

= What it does =

* **Browser check on your own server.** Visitors that do not look like a normal browser get a short check page. The browser solves a small calculation in JavaScript in about a second and gets a pass; bots stay outside. Choose Smart mode (only suspicious visitors), All visitors (for attacks) or Log only (see what would be blocked).
* **Verified search engines.** Google, Bing, Apple, DuckDuckGo, Yandex, Baidu and others are checked against their official address lists or by reverse DNS. Real crawlers pass; scrapers that only pretend to be Googlebot are blocked.
* **Bot categories.** Allow, check or block search engines, link previews, uptime monitors, AI assistants, AI training crawlers, SEO tools, vulnerability scanners, HTTP libraries and unknown bots. Block AI training crawlers with one click.
* **Traps for scanners.** Requests for files no visitor ever opens (.env, .git, copies of wp-config.php, database tools) and a hidden trap link ban the client for the time you choose.
* **Form protection.** Login, registration, lost password, comments and WooCommerce login and registration accept posts only from a real browser. People notice nothing; spam bots and password guessers are refused.
* **Allow and block lists.** IP addresses (IPv4, IPv6, CIDR), User-Agents and URLs that never get the check, such as payment webhooks.
* **Activity and statistics.** Charts for 24 hours, 7 and 30 days, top bots, addresses, pages and reasons, and a log of recent events.
* **Your check page.** Your logo and texts, with a live preview.
* **Safe by design.** Logged-in users are never checked, REST API, AJAX, cron, feeds and sitemaps are not touched, page caches do not store the check page, and an emergency switch file turns everything off.

= Full website protection =

BadBot Protection stops bad bots. SiteGuarding protects the whole website: Website Firewall (WAF), server-side antivirus, hack repair by our experts, DDoS prevention, brute force and card testing protection, GEO blocking and 24/7 monitoring come with the SiteGuarding Premium and Business plans. See [SiteGuarding plans](https://www.siteguarding.com/en/protect-your-website).

== Installation ==

1. Upload the plugin in Plugins > Add New > Upload Plugin, or unzip it into wp-content/plugins.
2. Activate it. Protection starts at once in Smart mode.
3. Open BadBot Protection in the admin menu to review the bot rules and add your own addresses to the allowed list.

== Frequently Asked Questions ==

= Will it hurt my search ranking? =

No. Google, Bing and other search engines are verified by their official addresses and never see the check. If a crawler cannot be verified, it gets a temporary "try later" answer, never a block.

= What do real visitors see? =

In Smart mode almost all of them see nothing. In All visitors mode each new visitor sees the check page for about a second, once per day by default.

= I locked myself out. What now? =

Create an empty file named sgbb-off.txt in the folder where WordPress is installed (next to wp-login.php) with FTP or the file manager of your hosting. The protection stops at once. Delete the file to turn it back on.

= Does it work with page caches and Cloudflare? =

Yes. The check page is never cached. Cloudflare is detected automatically; other proxies can be added in Settings so visitor addresses are read correctly. Pages served by a server cache before WordPress runs are served to bots too; turn on early protection in Settings to check visitors before plugins and caches.

= Which addresses are always allowed? =

Your own server and the four addresses of SiteGuarding service servers (178.63.42.54, 178.63.42.55, 135.148.11.71, 135.148.11.72), so the checks of SiteGuarding services keep working. Everything else follows your settings and lists.

= Does it send data anywhere? =

No. Bot detection, the browser check and the statistics all work on your server. The plugin only asks siteguarding.com for the number of the latest version, like any plugin update check.

== Privacy ==

The plugin sets one cookie, sgbb_pass, after a visitor passes the browser check. It contains no personal data and is needed for the protection to work. For up to a day after the check the plugin also keeps, on your server only, a one-way hash of the visitor's IP address and User-Agent, so that a browser which does not send the cookie back is not checked again. The activity log stores the IP address, User-Agent and requested page of bots and of visitors that got the check, on your server only, for 30 days by default. Visits of normal people are not logged.

== Screenshots ==

1. Overview: protection status, last 24 hours and 7 days.
2. Browser check: mode, pass lifetime and your check page with a preview.
3. Bots: allow, check or block each category, verified search engines.
4. Traps and forms: scanner traps, the hidden link, bans and protected forms.
5. Activity: charts, top bots, addresses and pages, recent events.
6. The check page your visitors see for about a second.

== Changelog ==

= 5.0.2 =
* Fix: a visitor whose browser does not keep the pass cookie (the in-app browsers of Facebook and Instagram on Android) is no longer asked to pass the browser check again and again.
* Improved: the check page tries on its own at most 3 times a minute, then shows a Try again button.
* Improved: the browser check steps aside only while the antibot of the SiteGuarding Firewall really checks the whole site.
* Fix: the hidden trap link also works on a website installed in a subfolder.
* Improved: a protected form sent by a page script (AJAX) without a pass gets a short answer instead of the check page.

= 5.0 =
* New: works on its own, without an account or the SiteGuarding dashboard.
* New: browser check on your own server, with Smart, All visitors and Log only modes.
* New: verified search engines by official addresses and reverse DNS; fake crawlers are blocked.
* New: bot categories, including AI assistants and AI training crawlers.
* New: traps for scanners, hidden trap link and bans.
* New: protection for login, registration, lost password, comment and WooCommerce forms.
* New: allow and block lists, excluded URLs, early protection, activity charts and log.
* New: modern interface with dark mode and mobile layout.

== Upgrade Notice ==

= 5.0.2 =
Visitors from the Facebook and Instagram apps on Android are no longer asked to pass the browser check again and again.

= 5.0 =
BadBot Protection now protects your site on its own, no account needed. Smart mode starts automatically after the update.
