A Cloudflare Worker that resolves redirect chains with controlled hop-following, safety guards, and clear stop reasons. It is open source under the MIT license, available to try at resolver.jeaurond.dev , and aims to be a super lightweight take on what urlscan.io does for URL investigation.
Why build this?
Short links, social redirect wrappers, and platform-specific user-agent behavior make it hard to know where a URL actually lands. I wanted a small resolver that follows redirects manually, explains why it stopped, and stays safe to run at the edge — without the overhead of a full scanning platform.
The whole thing runs on Cloudflare Workers ’ free tier, so anyone can deploy their own instance at no cost. Upstream requests are made from Cloudflare IPs, which is useful when you want to see how a link behaves from the edge rather than from your own machine or a dedicated scanner infrastructure.
Typical use cases include:
- * Unwrapping URL shorteners (bit.ly, t.co, …)
- * Debugging redirect chains during investigations
- * Peeling embedded wrapper URLs (Google, Facebook, Telegram, YouTube, …)
- * Comparing destinations across mobile vs desktop user agents
Live demo
The project ships with a static browser playground that talks to the deployed worker. No external CDN dependencies — fonts and syntax highlighting are bundled locally.
The UI includes a request form, copyable cURL, a redirect hop timeline, local resolve history, and a full JSON modal with a glossary of stop reasons and embedded URL rules.
API
The worker exposes a simple GET / POST API. Pass a URL, optionally chain user agents (ios, android, macos, windows, none), and tune flags such as stop-on-cross-domain, enforce-http-scheme, extract-response-body, and debug.
Responses include the normalized input, raw and extracted destinations, per-hop timing and headers, a stop_reason, and optional worker egress metadata when debugging is enabled.
Resolver behavior
Before hop resolution, known wrapper URLs are unwrapped recursively. Redirects are followed on the same host by default, with an exception for a built-in URL shortener domain list. Cross-domain redirects become the destination unless stop-on-cross-domain=false. User-agent chains can retry when a hop returns a non-redirect status, an app-store link on mobile, or a non-HTTP(S) Location header.
Built-in safety controls include configurable max hops, per-hop upstream timeouts, and optional Cloudflare Access at the edge.
🎩 Access Application
This application is available on🗞 Source Code
- Available on
- * GitHub (BenJeau/url-resolver-worker)