Cloudsteading

Self-hosted URL shorteners on Cloudflare D1

6 open-source URL shorteners on Cloudsteading run on Cloudflare D1, including Short, Sink and Short. D1 holds the short codes and their destinations, and a Worker answers each short link with a redirect. Some add KV as a cache or Analytics Engine for click counts. The bill follows Cloudflare usage, not a link quota.

All Bitly alternatives·Everything built with D1

How each one is built

Every project uses D1 and is mapped to Bitly. The rest of its Cloudflare setup, and its license, decide how much work it is to run.

Projects using D1, with license, Cloudflare primitives and what each replaces
ProjectLicenseCloudflareReplaces
ShortMITD1, PagesBitly, Rebrandly, Short.io
SinkAGPL-3.0-onlyAnalytics Engine, D1, KV, R2, Workers, Workers AIBitly, Rebrandly
ShortMITD1, PagesBitly, Short.io
SHRTNRApache-2.0D1, Durable Objects, KV, WorkersBitly, Rebrandly, Short.io
RelayMITD1, WorkersBitly, Rebrandly, Short.io
OpenShort.linkAGPL-3.0Analytics Engine, D1, KV, WorkersBitly, Rebrandly, Short.io

Frequently asked

Can I run a URL shortener on Cloudflare for free?+

A personal one, usually. The Workers Free plan allows 100,000 requests a day, and D1's free tier allows 5 million rows read and 100,000 rows written a day. Recording every click as a D1 row uses the write allowance fastest, so check how a project stores clicks before you put a busy link behind it.

Why D1 rather than KV for short links?+

KV is fast to read everywhere but eventually consistent: a new or edited link can take up to 60 seconds to reach every location. D1 is SQLite, so listing, searching and counting links are plain queries. Projects that want both keep links in D1 and cache popular ones in KV.

Can the short links use my own domain?+

Yes. A Worker can serve any domain on your Cloudflare account through a custom domain or route, so links can live on a short domain you own instead of a shared one.

What else do these projects use besides D1?+

Counting the 6 projects listed here: Workers (4), KV (3), Analytics Engine (2), Pages (2), Durable Objects (1), R2 (1). Each repository's Wrangler config shows exactly which bindings it needs.

6 Bitly alternatives using D1

Short

Sink

Analytics Engine+1

Short

Needs fixes before production use

SHRTNR

Relay

OpenShort.link

Analytics Engine