Bitly
Replaceable in one session with an AI coding agent.
A link shortener with tracking. Every short link records clicks, referrers and rough location, and paid plans add custom domains, QR codes and campaign grouping so marketing can tell which channel actually sent people.
Build me a self-hosted link shortener with honest click numbers. STACK - Node with Fastify, SQLite via better-sqlite3, server-rendered HTML - Caddy in front terminating TLS for the short domain CREATING LINKS - An admin page behind HTTP basic auth: destination, optional custom slug, base62 slug generated otherwise - Bulk import from a CSV of destination and slug - A reserved word list that can never become a slug THE REDIRECT - 301 for permanent links, 302 for links marked temporary - Every hit appended with timestamp, referrer host, coarse user-agent family and a salted hash of the IP - The raw IP is never stored anywhere KEEPING THE COUNTS HONEST - Obvious bots identified by user agent are counted in a separate column, not dropped and not mixed in - The stats page shows both numbers, so the smaller one is the real one STATS - Clicks per day for the last 30 days, top referrers, and top countries if a GeoIP database is present - QR code generated as SVG for any link DEPLOY - A Caddyfile proxying the short domain to the app - A nightly SQLite backup with a documented restore Include a README with deploy steps for one small VPS and the redirect latency you measured.
What you lose
- Automatic SSL provisioning and renewal for your branded short domain
- Click analytics that already separate humans from scanners and bots
- Redirect uptime on links you cannot edit once they are printed on something physical
- Existing bit.ly links, which cannot be migrated to another domain
- QR codes, mobile deep links and app-store routing handled for you
If you would rather not build
- Short.io — paid, custom domains and click analytics without self-hosting
The escape hatch
open source · no votes, no paid placement
YOURLS
$0Long-running PHP link shortener with click statistics and a plugin system.
YOURLS/YOURLSfree · open source
Shlink
$0Short-URL server with a REST API, QR codes and per-link visit tracking.
shlinkio/shlinkfree · open source
Why this verdict
our own opinion · changed only by a person
88/100
Verdict yes at 88: redirects plus a hits table is genuinely one session of work, and a short domain you control is strictly better than a shared one. Score is not higher only because link permanence is a real operational commitment.
History
tracked since 6 Aug 2026 · nothing is ever overwritten
Questions about Bitly
answered from the record above
Is Bitly free?
No — the plan we track is $10 a month. Core plan, billed annually at $120/yr. Bitly does not offer Core on monthly billing; the next tier up, Growth, is $35/mo month-to-month.
Can you replace Bitly by building your own?
YES. Replaceable in one session with an AI coding agent. Replacement score 88 out of 100, build time one session. Read what you lose before you decide.
How much does Bitly cost?
$10 a month on Core — $120 a year. Recorded 6 Aug 2026.
What do you lose by replacing Bitly?
Automatic SSL provisioning and renewal for your branded short domain; Click analytics that already separate humans from scanners and bots; Redirect uptime on links you cannot edit once they are printed on something physical; Existing bit.ly links, which cannot be migrated to another domain; QR codes, mobile deep links and app-store routing handled for you. If any of those carry weight for you, keep paying.
Is there an open-source alternative to Bitly?
Yes: YOURLS, Shlink, Dub. The prompt on this page is for when you want it your way instead.
Related entries
same category first, most replaced first
Every week, something stops being worth paying for.
New verdicts, prices that moved, entries added. One email a week. Unsubscribe in one click.
free forever · no tracking pixel · every prompt stays free on the site