Abuja Digital Studio · Est. 2018
Start a Project
DocsOrravo SEO Kit404 monitor and redirects
Reference

404 monitor and redirects

Orravo SEO Kitorravo.com/docs/orravo-seo-kit/monitor-redirects

404 monitor and redirects

How the monitor works

OSeo_404_Monitor::maybe_log() runs on template_redirect for any 404 response. Each unique URL gets one row in the log table; subsequent hits increment a counter. The log records first hit, last hit, hit count, referrer, and user agent.

Filters:

  • oseo_404_monitor_enabled option (default 1) toggles the engine
  • oseo_filter_bots option (default 0) drops requests where the user agent matches a bot pattern
  • oseo_spike_threshold option (default 50) triggers an admin notice when one URL is hit that many times in 24 hours

Weekly cleanup is oseo_prune_404s - registered on activation, runs through the WP cron at the weekly schedule.

Promoting a 404 to a redirect

On the 404 Monitor screen, click Promote next to any row. The action oseo_promote_404 opens the redirect form with the source URL pre-filled.

Other row actions:

  • Ignore - sets a flag so the URL never logs again (oseo_ignore_404)
  • Delete - removes the row
  • Export CSV - OSeo_404_Monitor::stream_csv_export() streams the whole log

Redirects

Managed under Redirects. Each entry has:

  • source - request URL or regex
  • destination - target URL
  • type - 301, 302, 307, or 308 (default 301)
  • enabled flag

CSV import

source,destination,type
/old-page,/new-page,301
/blog/old,/journal/new,302

OSeo_Redirects::import_csv( $csv_content ) parses the file, validates each row, and returns counts of imported, skipped, and failed rows.

Loop protection

OSeo_Redirects::check_loop( $source, $destination ) walks the redirect chain before saving so you cannot create a self-referencing loop.

404 monitor and redirects · Orravo SEO Kit Docs | Orravo