

The settings screen
Auto Redirect 404 to Custom URL is a fast, lightweight 404 redirect plugin that automatically sends every 404 “Page Not Found” error to a custom URL or your homepage — and now logs every broken link so you can see exactly which pages are missing.
Instead of losing a visitor to an error page, the plugin redirects them to a page that works. Instead of guessing which URLs are broken, the built-in 404 error log shows you every missing URL, how many times it was hit, and where the visitor came from.
If you are trying to clear “Not found (404)” errors out of Google Search Console, fix broken links after a site migration, or simply stop losing traffic to dead URLs, this plugin does it in about thirty seconds of setup.
Turn on 404 Logging from the settings screen and the plugin starts recording every broken URL on your site.
Each unique URL is stored once with a hit counter, so a crawler hitting the same missing page ten thousand times creates a single row — not ten thousand. The log is capped at 1,000 entries and trims the least recently seen URLs automatically, so it can never grow out of control.
From the 404 Logs tab you can:
Logging stores the requested path, the referring URL, a hit count and timestamps. No IP addresses and no user agents are recorded, so there is nothing personally identifying in the log.
Three controls on the settings screen decide exactly which 404s the plugin touches. On a new install they are switched on for you. If you are updating from an earlier version they start switched off, so your site keeps behaving exactly as it did until you choose to enable them.
Redirect Loop Protection verifies that your redirect destination actually exists before sending visitors to it. If the destination is itself missing, the plugin steps aside and shows the normal 404 page rather than bouncing the visitor back and forth until the browser gives up.
The check itself runs on a scheduled background task and whenever you save settings, never during a visitor’s request, so it can never add a single millisecond to a page load. A destination that has not been checked, or cannot be checked because your host blocks internal requests, is simply treated as fine and your redirects carry on working exactly as before.
Skip Files & System Paths keeps a real 404 for missing images, scripts, stylesheets, fonts, documents and archives, and for system paths such as /wp-json/, /wp-content/, feeds, sitemaps and robots.txt. Redirecting a missing image or script to an HTML page confuses browsers and crawlers, so this is switched on for new installs and recommended for everyone else.
Exclusion Patterns lets you list your own URL patterns, one per line, that should always keep a genuine 404:
/private/*
/downloads/*.zip
*/preview
/campaign-?
Use * to match any part of a path and ? to match a single character. Matching is against the path only, ignoring the domain and query string, and is not case sensitive. Excluded URLs are neither redirected nor logged.
Unhandled 404 errors quietly cost you:
A 301 redirect solves all four at once, and the 404 log tells you which URLs are worth a dedicated redirect.
Three filters let you customise behaviour without touching plugin files:
// Skip the redirect for specific URLs.
add_filter( 'r404c_should_redirect', function ( $should, $current_url, $target ) {
if ( false !== strpos( $current_url, '/keep-404/' ) ) {
return false;
}
return $should;
}, 10, 3 );
// Skip logging for specific URLs.
add_filter( 'r404c_should_log', function ( $should, $url ) {
return false === strpos( $url, '/wp-content/' ) ? $should : false;
}, 10, 2 );
// Exclude a request from both redirecting and logging.
add_filter( 'r404c_exclude_request', function ( $excluded ) {
return $excluded;
} );
If this plugin saved you time, please consider buying me a coffee or leaving a review. Both help enormously.
This plugin does not send any data to any external service.
The only network request it ever makes is Redirect Loop Protection issuing a HEAD request to your own site, to confirm the redirect destination exists before visitors are sent there. It runs on a scheduled background task, no data leaves your server, and the check can be switched off on the settings screen.
When 404 logging is enabled, the plugin stores the following in a table in your own database:
No IP addresses, no user agent strings, and no user account information are recorded. The log is capped at 1,000 rows and older entries are removed automatically. Logging is off by default and can be switched off at any time, and deleting the plugin removes the table entirely.
Need help? Have suggestions?