[ MM 00 / OPEN SOURCE ]

EVERY 404 GETS A DETOUR.

Catch every 404 and route lost visitors to a destination that converts.

A free, open-source WordPress plugin that turns 404 errors into recovered traffic. Five status codes. Per-URL routing. A 404 log that scales past a million rows. No telemetry. No upsells. GPL all the way down.

  • License GPL-2.0-or-later
  • WordPress 5.0+
  • PHP 7.4 - 8.3
  • Cost $0.00 forever
[ MM 01 / THE PROBLEM ]

Every 404 is a lost customer.

When a WordPress page disappears, the visitor doesn’t file a polite bug report. They hit the back button. They never come back. You lose the click, the rank, and the chance to convert.

100% of dead-end traffic bounces away from a stock 404 page.
~30 days is how fast Google can drop a 404'd URL out of the index.
0 visibility you have today into which URLs are actually breaking.
[ MM 02 / THE REROUTE ]

Detour catches the 404. You decide where the visitor goes.

Install the plugin, point it at a destination, and every dead URL on your site gets a second chance. Send them to the homepage. Send them to a category. Send a regex-matched bucket of legacy URLs straight to the matching new permalinks. Or return a clean 410 Gone for the stuff that should stay buried.

While that’s happening, Detour writes every miss to an indexed log. Sortable, deduped per IP, fast even at a million rows. You finally see what’s broken and can fix it from one screen.

[ MM 03 / ORIGIN STORY ]

We didn’t pave this road from scratch.

Detour started as All 404 Redirect to Homepage by wp-buy, a free GPL plugin that thousands of WordPress sites still depend on. The core idea, catch a 404 and route the visitor somewhere useful, came from there. Credit where it’s owed.

We forked it because we ran the original on production sites at scale and a lot of the cargo wasn’t paying its way. Bundled ad code. Premium upgrade nags. Backlinks injected into the emails your customers were getting. A .htaccess rewrite that fired on every admin pageview. A 404 table that ground to a halt past seven figures.

We rebuilt those parts. We kept the working ones. We put it back out under the same GPL-2.0-or-later license that let us start in the first place. The result respects the people who run the site and the people who land on it.

That’s the assignment we set ourselves. Build something that elevates the field, release it under a license that lets the next person fork and improve it, and let the codebase teach as it ships.

REMOVED What we ripped out

  • Bundled commercial JavaScript redistributed without a license. Replaced with a clean numeric stats panel.
  • Upsell banners, “Upgrade” admin notices, “More Plugins” cross-promotion, and outbound backlinks injected into email digests.
  • Dead code paths and broken helpers that depended on a $mysql global WordPress doesn’t actually have.
  • A .htaccess write on every admin pageview, plus twelve “success” log entries that filled production error logs for no reason.

REBUILT What we built in its place

  • A per-URL rules engine with three match types and five status codes, including 410 Gone for content that should stay deleted.
  • A real BINARY(16) URL hash column and an indexed counter. A million-row log sorts in milliseconds instead of triggering a full-table filesort.
  • Object-cache-backed lookups, throttled .htaccess writes, and quiet logging.
  • Zero telemetry. Zero outbound traffic. Zero premium tier waiting in the wings.

Drop-in for existing installs.

What stays

Your existing data is exactly where wp-buy left it.

  • {$prefix}redirects_404
  • p404_redirect_options
  • options-404-redirect-group

Preserved, unchanged.

What’s added

One new table for the per-URL rules engine.

  • {$prefix}detour_rules

Additive only. Nothing in the upstream layout was renamed or moved.

How to migrate

Install Detour over the original.

Settings and 404 history carry over. Walk away from the upsells without walking away from your configuration.

[ MM 04 / FEATURES ]

Signs, signals, and shoulders for every kind of broken link.

Per-URL routing rules

Match by exact URL, by prefix with optional {path} substitution, or by regex. Build the routing table your site actually needs.

Five HTTP status codes

301, 302, 307, 308 redirects plus 410 Gone for content that should stay deleted. Send the right signal to humans and to crawlers.

Site-wide fallback

Anything not matched by a rule goes to the destination of your choice. No more dead-end traffic, ever.

One-click rule creation

See a real broken URL in the log? Promote it to a routing rule with a single click. No copy-paste, no plugin chaining.

Built for big logs

Sortable hit history with per-IP deduplication and indexed counters. Tested past a million rows without falling over.

Weekly email reports

A short Monday-morning digest of which URLs broke, how often, and which got rerouted. No login required to read it.

Missing-image fallback

404s on .gif, .jpg, and .png requests get a clean placeholder instead of a broken-image icon.

Admin-bar widget

Live redirect metrics in the WordPress admin bar. See traffic recovered without leaving the page you’re working on.

[ MM 05 / PHILOSOPHY ]

Open source, the actual kind.

“No tracking, no telemetry, no upgrade nags, no affiliate links, no backlink injection. GPL all the way down.”

From the Detour README

The plugin is licensed GPL-2.0-or-later. Read the source. Fork it. Send a pull request. There’s no Pro tier waiting to upsell you.

[ MM 06 / INSTALL ]

Three steps. About four minutes.

  1. 01

    Upload

    Drop the detour folder into wp-content/plugins/ on your WordPress site, or install the zip from the GitHub release.

  2. 02

    Activate

    Activate Detour from the Plugins screen. Database tables and indexes provision themselves on first run.

  3. 03

    Configure

    Open Settings → Detour, set your fallback destination, and start adding routing rules. The 404 log starts filling immediately.

[ MINIMUM CLEARANCES ]
WordPress 5.0+ or later
PHP 7.4 - 8.3 minimum to tested
MySQL / MariaDB 5.7+ uses BINARY(16) columns
[ MM 07 / BUILDERS ]

Built by Centreville Tech.

Detour exists because we got tired of watching client sites bleed traffic into 404 land. We have shipped, hardened, and maintained WordPress builds for logistics, telecom, manufacturing, government, and startups since 2015. If your site needs more than a plugin, we can help with that too.

See what Centreville Tech builds →