=== 404 Monitor And Redirect ===
Contributors: stevestedman
Tags: 404, redirect, redirects, monitor, seo
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track 404 errors in a small, fast database and redirect mapped URLs as quickly as WordPress allows.

== Description ==

404 Monitor And Redirect records the URLs visitors and bots request that do not exist, lets you map them to a page, post, category or any address, and keeps its database small even with hundreds of thousands of URLs.

* **Fast redirects.** A mapped URL costs one indexed lookup. Counters and logging happen after the visitor has been sent on their way.
* **Counts that last.** Hit counts, created dates and last used dates are stored on each URL and redirect, not derived from the log. Deleting old log rows never lowers them.
* **Small by design.** Strings are stored once, log rows hold only small integers, scanner probes can be counted without logging, and everything has a retention rule.
* **No IP addresses.** Visitor IPs are never stored.
* **Admin screens.** Redirects, unmapped 404s (sortable and searchable by column), a daily chart and a table-by-table database size report.
* **Cloudflare export.** Turns the most-hit scanner URLs into a custom rule expression you can paste into Cloudflare, split to fit its length limit, with entries that could match real pages unticked.
* **Import and export.** CSV in and out, importers for the Redirection and 404 Redirected plugins (manual and automatic redirects), and WP-CLI commands (`wp m404 stats`, `purge`, `export`, `import`, `cloudflare`).
* **Redirect to anywhere.** A page or post, a category or tag, any address, or a 410 Gone answer.

Author: Steve Stedman, https://Steve.Stedman.info

== Installation ==

1. Upload the `404-monitor-and-redirect` folder to `/wp-content/plugins/`, or install from the Plugins screen.
2. Activate the plugin.
3. Open **404 Monitor** in the admin menu.

== Frequently Asked Questions ==

= What data does it store? =

The requested path and counters per URL and per day. While logging is on, each hit also stores its time, a user agent and a referrer, each saved once and shared between rows. Visitor IP addresses are never stored. Suggested privacy policy text is added under Settings, Privacy.

= Why are some 404s not counted? =

A page cache or CDN that serves a cached 404, and static files your web server answers before WordPress starts, never reach this plugin.

= Does deleting the log lower my hit counts? =

No. Counts and dates live on the URL and redirect rows.

= How do I block scanners at Cloudflare? =

Open 404 Monitor, Unmapped 404s, then Export for Cloudflare. Pick the entries to include and paste the expression into a Cloudflare custom rule. Entries marked "Could match real content" are unticked by default.

= What happens to my data if I delete the plugin? =

It is kept unless you tick "Delete data" in Settings first.

== Screenshots ==

1. Redirects grid with target, hit count, created and last used columns.
2. Unmapped 404s with per-column search and the mapping form.
3. Stats: daily chart and database space used by table.
4. Cloudflare export.

== Changelog ==

= 1.0.1 =
* New: import manual and automatic redirects from the 404 Redirected plugin (Tools page and `wp m404 import --format=redirected`).

= 1.0.0 =
* First release: redirects, 404 tracking, retention, Redirects and Unmapped 404s grids, Stats and Settings pages, Cloudflare export, CSV and Redirection importers, WP-CLI commands, privacy policy text.
