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

  1. When a visitor hits a 404 page, Switchboard logs the URL
  2. Repeat visits to the same URL increment the hit counter
  3. Referrer information shows where visitors came from
  4. 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:

FieldDescription
URLThe requested path that returned 404
Hit CountNumber of times this URL has been requested
First SeenWhen this 404 was first logged
Last SeenMost recent request for this URL
ReferrerThe page visitors came from (if available)
User AgentBrowser/bot identification

Settings

Configure tracking behavior in the module settings:

SettingTypeDefaultDescription
Exclude BotsToggleOnFilter out crawlers and automated scanners
Track ReferrerToggleOnRecord where visitors came from
Ignore PatternsTextareaCommon patternsURLs to skip tracking
Retention DaysNumber30Auto-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:

  1. Note the 404 URL
  2. Go to Switchboard → Redirects
  3. Create a redirect from the 404 URL to the correct destination
  4. The 404 will no longer occur for that URL

If the referrer shows an internal page:

  1. Note which page contains the broken link
  2. Edit that page and fix the incorrect URL
  3. The 404 stops occurring once the link is corrected

Restore Content

If many people are looking for deleted content:

  1. Consider restoring the page from backup
  2. Or create new content at that URL
  3. 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, add wp-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.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro