Skip to main content

v2.10.0 — 404 auto-heal + redirect hit tracking

· 4 min read
Magento + commerce specialists

The third leg of the URL hygiene story. v2.9 captured 404s. v2.10 turns them into 301s automatically.

What's new

404 Auto-Heal Suggestions

Daily cron walks the unresolved 404 log, fuzzy-matches each path against the live URL corpus from url_rewrite, and queues suggestions in a new review grid at Marketing → SEO Suite → 404 Auto-Heal Suggestions.

Three match strategies, scored 0.0 to 1.0:

  • slug — last-segment exact match (/old-shop/acme-pro.html/shop/acme-pro.html). Strong signal, ~0.85+ confidence.
  • exact_token — every token in the 404 is present in the live URL (/sneakers/shop/footwear/sneakers/all). ~0.7+ confidence.
  • fuzzy — Jaccard token overlap blended with PHP's similar_text(). Catch-all, configurable threshold.

Per-row Approve & Apply / Reject + mass actions. Same review queue UX as the AI Meta Suggestions feature, so admins know how to drive it instantly.

Optional auto-approve

auto_heal_active = Yes
auto_heal_min_confidence = 0.75
auto_heal_auto_approve_at = 0.9

Suggestions ≥ 0.9 confidence apply automatically. Suggestions between 0.75 and 0.9 wait for human review. Below 0.75 ignored.

This config is what we'd recommend for B2B catalogs with a steady drip of 404s — the suite handles the long tail without your team logging in.

Hit-count auto-increment

The redirects grid's hit_count and last_hit_at columns are now actually populated. New observer on controller_front_send_response_before detects 301/302 responses and increments the sidecar atomically. Find redirects that haven't been hit in 6+ months and confidently delete them.

What gets suggested

Corpus is built from url_rewrite rows where redirect_type = 0 — real, live URLs only. Existing redirects are excluded so the auto-healer never suggests redirecting to another redirect.

Coverage:

  • All product / category / CMS URLs Magento knows about
  • All custom URL rewrites you've created
  • Per-store, with store_id matching for accuracy

Out of scope: external "discovered URLs" from Search Console (use a CSV import for those), URL keys that no longer exist anywhere in url_rewrite (the OOS Rules Engine handles those separately).

Performance

The matcher is intentionally cheap:

  • Corpus is built per-store, cached in-memory for the cron run
  • Tokenisation is dirt simple (split + stop-word filter)
  • Jaccard runs as integer set intersection
  • similar_text only fires when Jaccard ≥ 0.2

A typical run of 50 404s against a 5000-URL corpus completes in 1–3 seconds.

Cron schedule

*/30 * * * *  byte8_seosuite_ai_auto_generate
0 2 * * * byte8_seosuite_index_audit
30 2 * * * byte8_seosuite_hreflang_scan
0 3 * * * byte8_seosuite_oos_rules
30 3 * * * byte8_seosuite_purge_404_log
0 4 * * * byte8_seosuite_404_auto_heal ← new

The 04:00 slot is intentional: by then the 03:30 purge has already trimmed the 404 log, so the auto-healer scans only fresh data. All five daily jobs together complete in well under 10 minutes on a typical install.

CLI

bin/magento seosuite:redirect:auto-heal           # all enabled stores
bin/magento seosuite:redirect:auto-heal -s 1 # specific store
bin/magento seosuite:redirect:auto-heal -l 10 # cap suggestions this run

Useful when migrating off another redirects module: capture 404s for a few days, then run the auto-healer manually with -l 100 to surface the worst offenders for one-shot review.

Migration

Pure additive. New table byte8_seosuite_404_suggestion (FK to 404 log with CASCADE), new cron job, new admin grid + menu entry, new CLI command. All gated by config flags off by default.

composer update byte8io/magento-seosuite
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Then enable in Stores → Configuration → SEO Suite → Redirects & 404 capture → Enable 404 auto-heal cron.

What's NOT in this release

  • Regex redirects — the sidecar table can support them but Magento's url_rewrite can't, so they need a custom router that intercepts before Magento's url_rewrite resolver. Different shape of work — punted to v2.11.
  • Anthropic-powered semantic matching — currently the matcher is purely lexical. A "buy-running-shoes" 404 won't match a "shop/footwear/athletic" live URL even though they're conceptually identical. Roadmapped to use Claude with batched API calls when fuzzy matching falls below threshold.
  • External URL discovery — pulling "Discovered URLs" from Search Console to widen the 404 corpus. Roadmapped for the GSC integration milestone.

What's next

  • v2.11: Regex redirects (custom router); GSC integration (impressions/clicks per URL into the dashboard widget)
  • v2.12+: HTML sitemap, image/video XML sitemaps, pagination SEO controls, Schema Composer, AI image alt-text

— The Byte8 team