=== KanaryGate Honeypot ===
Contributors: kanarygate
Tags: bots, scraping, robots.txt, ai crawlers, security
Requires at least: 5.2
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Catches scrapers that ignore robots.txt with hidden trap links, and reports them to your KanaryGate account.

== Description ==

KanaryGate adds two links to your pages that people can't see, pointing to a path your robots.txt tells every crawler to avoid. Honest crawlers (including Google, Bing and the AI search crawlers) read robots.txt and never follow them. Anything that does has ignored your rules, and KanaryGate records it as evidence: its address, network, user agent and timing.

* Adds a `Disallow` rule for the trap path to WordPress's robots.txt.
* Records a fingerprint of each published post or page the first time it's viewed, so you can later show what you published and when.
* Optional: "trap facts" on priority pages you choose, which vary truthful wording from visit to visit (for example "£4.2m" or "£4.2 million") so a copy can be traced back to the visits that could have made it.
* Optional, off by default: block any address that takes the bait, for 24 hours.

You need a KanaryGate account and site key: https://kanarygate.com

== External service ==

This plugin sends data to KanaryGate (by default `https://ingest.kanarygate.com`, the address set in Settings → KanaryGate). It sends:

* **When a visitor follows a trap link:** that visitor's IP address, user agent, a few request headers used to tell browsers from scripts (Accept, Accept-Language, Accept-Encoding, Sec-CH-UA, Sec-Fetch-Site, Referer), the page path and the time.
* **The first time each published post or page version is viewed:** its address, title and text, to record its fingerprint. Drafts, previews and password-protected posts are never sent.
* **On priority pages with trap facts:** which wording variant a visit saw, with a one-way hash of the visitor's IP address (never the address itself) and their user agent.
* **To fetch approved trap facts:** a request with your site key, cached for 5 minutes.

Ordinary visitors who never follow a trap link are not reported, except for the hashed record on priority pages with trap facts. KanaryGate's privacy notice: https://kanarygate.com/privacy.html. Terms: https://kanarygate.com/terms.html

== Installation ==

1. Plugins → Add New → Upload Plugin, choose the zip, then Install and Activate.
2. Settings → KanaryGate: paste your site key and save.
3. Test it: open `/cg-archive/test` on your site in a private window. You should see a plain page titled "Archive index", and within a minute your dashboard shows "Honeypot active". The test link never blocks you.

Full guide: https://kanarygate.com/guides/install-kanarygate/

== Frequently Asked Questions ==

= Will it slow my site down? =
No noticeable amount. Reports are sent in the background, with short timeouts, and the plugin fails open: if KanaryGate can't be reached, your site carries on as normal.

= Does it change what search engines see? =
The trap links point to a path your robots.txt forbids, so search engines that follow the rules ignore them. Anything identifying itself as a known search crawler gets your original wording on trap-fact pages.

= Will my own SEO tools get caught? =
Only if they ignore robots.txt. If you set a site-audit crawler to ignore it, it will show up as a catch. Add it to the allow-list in your KanaryGate dashboard settings to leave its visits out of your counts and alerts. If you use the plugin's auto-block, also put its address under Settings → KanaryGate → Never block.

= What happens when I delete the plugin? =
Its settings, block list, cached trap facts and page markers are removed from your database. Data already sent to KanaryGate is kept under your agreement; email hello@kanarygate.com to have it deleted.

== Changelog ==

= 0.1.0 =
* First release: trap links, robots.txt rule, page fingerprints, trap facts, optional 24-hour auto-block with a "Never block" list, clean uninstall.
