Track 404s
Automatically track every 404 error on your site. See which URLs visitors are trying to access, where they’re coming from, and how often each error occurs—then fix the broken links or set up redirects.
Use Cases
- Discover broken internal links that hurt user experience
- Find external sites linking to old or incorrect URLs
- Identify popular missing content that should be restored or redirected
- Monitor for suspicious scanning activity or attack attempts
- Clean up 404s to improve SEO and crawl efficiency
Where to Find It
Navigate to Switchboard → Track 404s to view your 404 log with full statistics, filtering, and export options.
How It Works
- When a visitor hits a 404 page, Switchboard logs the URL
- Repeat visits to the same URL increment the hit counter
- Referrer information shows where visitors came from
- View logs in the admin panel and take action
Dashboard Statistics
The Track 404s dashboard shows at a glance:
- Total Hits: Combined 404 errors logged
- Unique URLs: Number of distinct 404 URLs
- New Today: 404s first seen in the past 24 hours
- Top 404s: Most frequently hit missing pages
- Recent 404s: Latest logged errors
What Gets Tracked
For each 404 error, the module records:
| Field | Description |
|---|---|
| URL | The requested path that returned 404 |
| Hit Count | Number of times this URL has been requested |
| First Seen | When this 404 was first logged |
| Last Seen | Most recent request for this URL |
| Referrer | The page visitors came from (if available) |
| User Agent | Browser/bot identification |
Settings
Configure tracking behavior in the module settings:
| Setting | Type | Default | Description |
|---|---|---|---|
| Exclude Bots | Toggle | On | Filter out crawlers and automated scanners |
| Track Referrer | Toggle | On | Record where visitors came from |
| Ignore Patterns | Textarea | Common patterns | URLs to skip tracking |
| Retention Days | Number | 30 | Auto-delete logs older than X days |
Ignore Patterns
By default, common non-actionable 404s are ignored:
.env,.git,wp-config(security scans)favicon.ico,apple-touch-icon(browser requests)xmlrpc,wp-login.php(bot attack attempts)phpmyadmin,mysql,adminer(exploit scans)
Add your own patterns as a comma-separated list. Any URL containing a pattern will be ignored.
Example ignore patterns:
/test/,/staging/,/backup/,.map,/api/internal/Filtering Bots
When “Exclude Bots & Crawlers” is enabled, the module filters out:
- Googlebot, Bingbot, and other search engine crawlers
- Social media crawlers (Facebook, Twitter, LinkedIn)
- SEO tools (Ahrefs, SEMrush, Moz)
- Monitoring services
- Common scraping libraries (Python requests, curl, wget)
This keeps your logs focused on real visitor issues rather than automated noise.
Taking Action on 404s
When you identify a 404 that needs fixing, you have options:
Create a Redirect
Pair this module with Redirects Manager to:
- Note the 404 URL
- Go to Switchboard → Redirects
- Create a redirect from the 404 URL to the correct destination
- The 404 will no longer occur for that URL
Fix the Link
If the referrer shows an internal page:
- Note which page contains the broken link
- Edit that page and fix the incorrect URL
- The 404 stops occurring once the link is corrected
Restore Content
If many people are looking for deleted content:
- Consider restoring the page from backup
- Or create new content at that URL
- Or redirect to the closest alternative
Exporting Data
Click the export button to download your 404 log as a CSV file containing:
- URL
- Hit Count
- First Seen
- Last Seen
- Referrer
Use this for:
- Sharing with developers or SEO consultants
- Analyzing patterns in spreadsheets
- Creating bulk redirect lists
Data Retention
To prevent database bloat, configure auto-cleanup:
- 30 days (default): Good balance of history and storage
- 7 days: Minimal storage, recent data only
- 90 days: More history for trend analysis
- 0 (disabled): Keep logs forever (not recommended)
Cleanup runs automatically once per day.
Rate Limiting
To prevent a single visitor or bot from flooding your logs:
- Same IP + URL combination has a 60-second cooldown
- Prevents artificial inflation of hit counts
- Ensures accurate statistics for real traffic patterns
FAQ
Will this slow down my site?
Tracking adds minimal overhead. The 404 check happens after WordPress determines the page doesn’t exist, and database writes are simple inserts or updates.Why do I see so many wp-login.php 404s?
Bots constantly probe WordPress sites for vulnerabilities. These are filtered by default ignore patterns. If you’re seeing them, addwp-login.php to your ignore list.Can I track 404s on specific pages only?
The module tracks all 404s site-wide. Use ignore patterns to exclude URLs you don’t care about.How does this help SEO?
404 errors waste crawl budget and frustrate users. By fixing broken links and adding redirects, you improve both search engine crawling efficiency and user experience.Why is the referrer sometimes empty?
Referrer information depends on browser behavior and privacy settings. Direct visits, bookmarks, and some browsers don’t send referrer headers.Get access to all 147 modules with a single license