‌‌‌‌​​‌‌​‍‌​‌​‌‌‍‍‌​‍‌‌​​‌​​‌‌​‍ Cloudflare edge · Free tier · Sub-ms lookup

Every dead end, redirected.

Detour is a Cloudflare Worker that resolves redirects at the edge — before a request ever reaches your origin — and logs the 404s that slip through. Exact and regex rules, query-string preservation, redirect-chain detection. Built for agencies migrating sites and devs who hate watching 404s pile up.

Detour redirect rules
/old-page /new-page 301
/blog/* /articles/$1 301 · regex
/promo /2024/spring-sale 302
Resolved at the edge in < 1 ms — no origin hit
Features

Redirects that resolve before they reach you.

Sub-millisecond edge lookups

Rules live in Cloudflare KV and resolve in the Worker before the request ever reaches your origin. A hit is a single edge read — 301 or 302 returned with no round-trip, no plugin boot, no PHP. Faster than anything that runs on your server could ever be.

Exact + regex rules

Exact rules for one-to-one moves (/old → /new) and regex rules with backreferences for whole sections (^/blog/(.+)$ → /articles/$1). Exact always beats regex; regex is first-match-wins in insertion order, so layered migrations stay predictable.

Query strings preserved

By default the visitor's query string carries through to the destination — /old?ref=email → /new?ref=email — so your UTM tags and tracking params survive the redirect. Need to drop them? Flip keepQuery:false per rule.

A 404 log that beats Search Console

Every dead link is logged at the edge with a hit count and first/last-seen timestamps — so you catch the broken URL the day it starts hurting, not weeks later when Google finally reports it. PII-free by design: paths and counts only, never IPs or user agents.

Redirect-chain detection

Migrations stack up chains — A→B→C — that burn crawl budget and waste a hop on every visit. The chain linter flags every redirect whose destination is itself a source, shows you the full chain, and tells you the final target to collapse to. It catches loops, too.

Token-protected admin & API

A vanilla-JS admin tool at /admin and a clean control-plane API, both gated by a single X-Detour-Admin secret with constant-time comparison. No secret set means the control plane fails closed. CSV bulk import lets you load a whole migration's rules in one paste.

How it works

In front of your site in four steps.

1

Point your hostname at Detour.

Add your host as a custom domain on the Detour Worker, or attach the Worker to a yoursite.com/* route on your own Cloudflare zone. Set your real origin so unmatched requests proxy straight through.

2

Add your rules.

Use the admin tool at /admin or the API to add exact and regex redirects — or bulk-import a whole migration from a CSV with a single source,destination,type,regex header.

3

Detour resolves at the edge.

On every request, the Worker checks the exact rule key first, then the regex list. A hit returns 301/302 immediately — before your origin is touched. A miss proxies through to your real site.

4

Watch the log, collapse chains.

The 404 log surfaces dead links the moment they're hit. Run the chain linter to find A→B→C hops and collapse them to the final target. Clean redirects, fewer 404s, happier crawlers.

What's included

The essentials are free. Scale, regex, and records are paid.

Free covers exact 301/302 redirects and a recent 404 log. A license adds regex rules, the unlimited log, CSV import, and the chain detector.

Exact redirects (301/302)
Free
Query-string preservation
Free
Edge KV resolution
Free
404 log (last 50)
Free
Admin tool + API
Free
Origin proxy fallback
Free
Regex redirect rules
Paid
Unlimited 404 log + filtering
Paid
404 log export
Paid
CSV bulk import
Paid
Redirect-chain detector
Paid
Redirect analytics
Paid
Pricing

Free forever for exact redirects. Paid when you need regex, records, and scale.

Monthly Annual Save 15%
Free
Free
Exact redirects for one site
$0forever
No credit card
  • Exact redirects (301/302)
  • Query-string preservation
  • 404 log (last 50)
  • Admin tool + API
  • Regex rules (locked)
  • Chain detector (locked)
Get Free
Agency
Agency
For studios migrating many sites
$39.95/month
billed monthly
$39.95/mo$33.95/month
$407.40 billed annually
  • Everything in Single
  • 10 domains + subdomains
  • Per-domain 404 logs
  • Redirect analytics
  • Email support
  • Priority support
Unlimited
Unlimited
For high-volume studios & enterprises
$99/month
billed monthly
$99/mo$84.15/month
$1,009.80 billed annually
  • Everything in Agency
  • Unlimited domains
  • Priority support (<24hr)
  • White-glove onboarding
  • Early access to new plugins
  • Volume pricing on full Suite
FAQ

Questions

How is this different from a redirect plugin or .htaccess?

It runs at the edge — in a Cloudflare Worker, before the request ever reaches your origin server. A WordPress redirect plugin only fires after PHP boots; an .htaccess rule only fires once Apache has the request. Detour resolves the redirect on Cloudflare's network, which means it's CDN-cache-aware, instant, and works even if your origin is slow or down. It also means zero load on your server for redirects.

How do regex rules work?

Regex rules let you redirect whole sections in one line. A source pattern like ^/blog/(\d{4})/(.+)$ with destination /articles/$2 uses $1, $2 backreferences to the captured groups. Exact rules always take precedence over regex, and regex rules are evaluated in insertion order — first match wins — so a big migration stays predictable. Regex is a paid-tier feature.

What does the 404 log actually capture?

For each dead path: the path itself, a hit count, and first-seen / last-seen timestamps — that's it. It's PII-free by design, with no IPs and no user agents. The free tier keeps the last 50; a license unlocks the full log with filtering and export so you can hunt down broken links the day they start hurting instead of waiting weeks for Search Console.

What's a redirect chain, and why collapse it?

A chain is A→B→C: an old URL redirects to another URL that itself redirects again. Each hop costs a round-trip and burns crawl budget, and chains tend to pile up across multiple migrations. The chain detector (paid) flags every rule whose destination is itself a source, shows you the full chain and its final target, and catches loops — so you can rewrite A→C directly.

Do my query strings and UTM tags survive the redirect?

Yes, by default. /old?ref=email → /new?ref=email — the visitor's query string is carried to the destination, and if the destination already has its own query, the two are merged. If you'd rather strip the query on a given rule, set keepQuery:false when you create it.

How do I put Detour in front of an existing site?

Two ways: add your hostname as a custom domain on the Detour Worker, or attach the Worker to a yoursite.com/* route on your own Cloudflare zone. Then set your real origin so any unmatched request proxies straight through to your live site — only the paths you've added rules for get redirected. Manage everything from the token-protected admin tool at /admin.

Get started

No more dead ends.

Put Detour in front of one site for free and resolve your exact redirects at the edge. See how fast a redirect can be when it never touches your origin.