[WordPress] 外掛分享: Auto Redirect 404 to Custom URL – 404 Redirect & Error Log

首頁 › 外掛目錄 › Auto Redirect 404 to Custom URL – 404 Redirect & Error Log
WordPress 外掛 Auto Redirect 404 to Custom URL – 404 Redirect & Error Log 的封面圖片
30+
安裝啟用
★★★★★
5/5 分(1 則評價)
26 天前
最後更新
—
問題解決
WordPress 5.0+ PHP 7.4+ v1.2.0 上架:2025-11-24

內容簡介

Auto Redirect 404 to Custom URL 是一款快速且輕量的 404 重新導向外掛,能自動將所有 404 錯誤頁面導向自訂 URL 或首頁,並記錄每個壞鏈接,讓使用者能清楚了解缺失的頁面。

【主要功能】
• 將 404 錯誤導向首頁或任何 URL
• 404 錯誤日誌,記錄每個壞鏈接
• SEO 友好的 301 重新導向
• 修正 Google Search Console 的 404 錯誤
• 一鍵啟用/停用導向與日誌
• CSV 匯出完整的 404 日誌

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Auto Redirect 404 to Custom URL – 404 Redirect & Error Log」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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.
Key Features

Redirect 404 to Homepage or Any URL – send all 404 errors to your homepage, a landing page, a category, or an external site
404 Error Log – every broken URL recorded with a hit counter, referrer, and first/last seen timestamps
SEO-Friendly 301 Redirects – permanent redirects that pass link equity, with a 302 temporary option when you need it
Fix Google Search Console 404 Errors – resolve “Not found (404)” and soft 404 reports with proper redirects
One-Click Enable / Disable – toggle redirects and logging independently, without deactivating the plugin
Quick Page Select – pick any published page from a dropdown instead of typing a URL
CSV Export – download your full 404 log for analysis in Excel or Google Sheets
Top 404 Errors Widget – your five worst broken links, right on the settings screen
Privacy-Friendly Logging – no IP addresses, no user agents, no personal data stored
Self-Limiting Log Table – hard-capped at 1,000 rows, so a bot scan can never bloat your database
Smart Exclusions – feeds, sitemaps, robots.txt, REST API and cron requests keep their real 404 status
Skip Files & System Paths – missing images, scripts, fonts and documents keep a real 404 instead of being redirected
Custom Exclusion Patterns – your own wildcard rules for URLs that should stay a genuine 404
Redirect Loop Protection – checks the destination really exists before sending anyone to it
Lightweight & Fast – no bloat, no third-party services, and zero work on pages that are not 404s
Works With Any Theme – runs independently of your theme and page builder

The 404 Error Log
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:

Sort by hit count to find your most damaging broken links first
Search the log by URL or referrer
See where each broken link was clicked from
Delete individual entries, bulk delete, or clear the whole log
Export everything to CSV

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.
Exclusions & Safety
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.
Why Fix 404 Errors?
Unhandled 404 errors quietly cost you:

Traffic – visitors who hit an error page usually leave and do not come back
SEO rankings – crawl budget is wasted on dead URLs, and inbound link equity is lost
Conversions – a potential customer who lands on an error page is a lost sale
Credibility – broken pages make a site look abandoned

A 301 redirect solves all four at once, and the 404 log tells you which URLs are worth a dedicated redirect.
Perfect For

Fixing 404 errors after a site migration or redesign
Recovering traffic from deleted posts, pages, and products
Cleaning up “Not found (404)” reports in Google Search Console
Finding broken links pointing at your site from elsewhere
Catching mistyped URLs in your own navigation and content
SEO audits and ongoing link maintenance

For Developers
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;
} );

Support the Developer
If this plugin saved you time, please consider buying me a coffee or leaving a review. Both help enormously.
Privacy
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:

The requested URL path that returned a 404
The referring URL, if the browser supplied one
A hit counter and the first/last seen timestamps

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.
Support
Need help? Have suggestions?

Support Forum
Buy Me a Coffee – Support development

延伸相關外掛

文章
Filter
Mastodon