=== 404 Monitor DL ===
Contributors: devlemon
Tags: 404, broken links, missing pages, monitoring, error log
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight 404 monitoring with hit counts, last-seen dates, referrers, retention controls, and privacy-friendly logging.

== Description ==

**404 Monitor DL** records the URLs your visitors actually try to access that don't exist — giving you real, actionable data instead of crawler guesswork.

**What it does**

* Records every real 404 request with an aggregated hit counter.
* Tracks the first time and most recent time each path was requested.
* Optionally stores the most recent HTTP referrer for each missing URL.
* Groups requests by path — query strings are stripped so `/page/?utm_source=a` and `/page/?utm_source=b` count as the same record.
* Automatically removes old records based on your chosen retention period (7 / 30 / 90 / 180 days, or keep indefinitely).
* Optionally filters obvious automated scan noise (.env probes, wp-config.php scans, etc.).

**What it does not do**

* It does not store IP addresses, user agents, cookies, or any visitor-identifying data.
* It does not modify your 404 template, change status codes, or issue redirects.
* It does not crawl your site looking for broken links.
* It does not send data to any external service.

**Privacy by design**

The log table stores only: path, hit count, first-seen date, last-seen date, and an optional sanitized referrer URL. There is no visitor fingerprinting of any kind.

**Works alongside Redirect Manager DL**

404 Monitor DL works completely independently. It may integrate with Redirect Manager DL in a future version.

== Installation ==

1. Upload the `404-monitor-dl` folder to `/wp-content/plugins/`, or install via the WordPress plugin screen.
2. Activate the plugin.
3. Go to **Tools → 404 Monitor DL** to view 404 traffic.

== Frequently Asked Questions ==

= Does the plugin store visitor IP addresses? =
No. IP addresses are never stored or logged.

= Does it store user agents? =
No. User-agent strings are checked only in memory (for bot-noise filtering) and are never persisted.

= Does it modify my 404 page? =
No. The plugin only observes; it never alters templates, status codes, or headers.

= Does it redirect missing URLs? =
No. Use Redirect Manager DL for redirects.

= Can I clear logs? =
Yes. Use the "Clear All Logs" button on the Logs tab.

= Can logs expire automatically? =
Yes. Set a retention period in Settings and old entries are cleaned up once per day.

= Does it use an external service? =
No. All data is stored locally in your WordPress database.

= Does it work with Redirect Manager DL? =
It works independently. Integration may be considered in a future version.

== Screenshots ==

1. 404 Monitor DL overview with stats bar and log list.
2. Tracked missing URLs with hit counts and dates.
3. Search and sort controls.
4. Retention and privacy settings.
5. Clear All Logs server-side confirmation.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
