Vibecode Bitly

track this build5 phases, 15 steps, beginner friendly
YES · one-shottable
price $35/moyou'd save $420/yrbuild time one sittingcategory 📊 analyticsreplaced by 0 people

A slug, a lookup, a 302, and a row in a table. Cloudflare Workers plus KV and D1 does the whole job on the free tier, and QR codes are one library call. The only thing you are really buying is that bit.ly resolves links created in 2012 and will presumably still resolve them in 2032, which is an institutional promise rather than a technical one. If the links are going in a magazine ad or on packaging, that promise is worth something. If they are going in this week's newsletter, it is worth nothing, and Growth is 420 USD a year.

the project pack5 files · written for this build, step by step
README.md
# Bitly · indie build

A redirect service mapping short codes to destinations with a fast redirect path, click logging that records device class and country without identifying anyone, QR codes generated for any link, and an export that lets the links survive the software.

Estimated effort: **weekend**. Work `BUILD_PLAN.md` top to bottom · every phase ends in a check that has to pass before the next one starts.

## Stack

| Part | Choice | Why |
| --- | --- | --- |
| Runtime | Go or Node 22 with PostgreSQL | the redirect is the hot path and everything else is administration |
| Redirect | A temporary redirect with the lookup served from memory | a redirect that waits on a database round trip is slower than the page it points at |
| Codes | Generated random codes, not sequential | sequential codes let anyone enumerate every link you have ever made |
| Analytics | Device class and country derived at request time, never a stored identifier | you can count clicks without building a record of who clicked |
| QR | Generated at request time with error correction sized to the code | a QR code printed too small or with too little correction fails in the real world |

## Before you start

Have every one of these ready. The plan assumes them from step one.

- [ ] **Go or Node.js 22 or newer** · free
  - Why: The redirect is a hot path worth being able to profile confidently.
  - Get it: go.dev or nodejs.org.
  - Verify: The toolchain builds and runs a hello world
- [ ] **A short domain you will keep for a decade** · varies by extension; short ones cost more, and this is a long commitment
  - Why: This is the real prerequisite. Every link depends on the domain continuing to exist, and links outlive intentions.
  - Get it: Register something short you will not resent renewing. Set auto-renew immediately and record who else can renew it.
  - Verify: The domain auto-renews and a second person knows how
- [ ] **PostgreSQL 16 or newer** · free
  - Why: Links and aggregated counts. The redirect path does not touch it, but everything else does.
  - Get it: Install locally or run it in Docker.
  - Verify: psql connects and reports 16 or higher
- [ ] **A country lookup database you may use** · free at country level with an open database
  - Why: Country is derived at request time from the address, which is then discarded. The database has to be one you are licensed to use.
  - Get it: An openly licensed country-level database is sufficient; you do not need city precision and should not store it.
  - Verify: A known address resolves to the right country
- [ ] **A printer, for the QR phase** · free
  - Why: Printed codes fail for reasons that are invisible on screen: size, quiet zone and contrast. The only test is a printed one.
  - Get it: Any printer. Print at the size you intend to use and scan from the intended distance.
  - Verify: A printed code scans at real size

## Quick start

Follow Phase 1 in `BUILD_PLAN.md`; it creates the project.

Then copy `.env.example` to `.env` and fill in the values it documents.

## Honest limits

This build deliberately does not replace:

- The recognition and longevity of an established short domain.
- Campaign grouping and landing pages.
- Individual click journeys and visitor identification.
- Any guarantee your links outlive your domain renewal.
- links that outlive your own infrastructure · a domain you stop renewing takes every link with it
- bit.ly's recognition in the link itself, which cuts both ways now that shorteners get spam-filtered
- bundled QR code management, landing pages, and campaign grouping
- city-level and device-level analytics rollups without building them
- an SLA and someone to call

If one of those is essential to you, that is the reason to keep paying for Bitly, and the README should say so rather than pretend.

$ choose a build depth, inspect the files, then open the complete pack in your agent

why people still pay

Bitly's actual product is a promise about the future: that a link printed on a box in 2019 still resolves today. No amount of code buys that, only an institution that intends to keep existing. Teams also pay for shared workspaces, SSO, and the audit trail, and marketing departments pay because the alternative is asking engineering for a redirect and waiting two weeks.

what you lose

xlinks that outlive your own infrastructure · a domain you stop renewing takes every link with it

xbit.ly's recognition in the link itself, which cuts both ways now that shorteners get spam-filtered

xbundled QR code management, landing pages, and campaign grouping

xcity-level and device-level analytics rollups without building them

xan SLA and someone to call

share on X ↗"I just replaced Bitly ($35/mo) with one prompt"
the escape hatch

Don't feel like building it? These folks already made it free.

DubBitly with deeper attribution; self-hosting means recreating half a startup's infrastructure.24kaug 2026open source↗SinkA polished Bitly clone on Cloudflare; free hosting, several bindings, and no server to patch.7.0kjul 2026open source↗ShlinkBranded links, routing rules and serious click stats in one container; the QR endpoint is living on borrowed time.5.2kjul 2026open source↗

all 4 free alternatives to Bitly →· no votes, no pay-to-list · just what's real

the numbers

Bitly pricing

planmonthlyannual (per mo)what you get
free$0/workspace$0/workspace5 links/month; 2 QR codes/month; 2 landing pages; 3 custom back-halves/month; 1,000 API requests/month; unlimited clicks/scans
core—$10/workspace100 links/month; 5 QR codes/month; 5 landing pages; 5 redirects/month; 5,000 API requests/month; 30-day analytics history
growth$35/workspace$29/workspace500 links/month; 10 QR codes/month; 10 landing pages; 20 redirects/month; 25,000 API requests/month; 120-day history; 1 custom domain
premium$300/workspace$199/workspace3,000 links/month; 200 QR codes/month; 20 landing pages; 110 redirects/month; 50,000 API requests/month; 1-year history
enterprisecustom—Custom links, QR codes, landing pages, API volume and users; 2-year analytics history

free tier5 links/month, 2 QR codes/month, 2 landing pages, 3 custom back-halves/month, 1,000 API requests/month, and unlimited clicks/scans

billingCore annual only; Growth and Premium monthly + annual; plans auto-renew and sales tax may apply

hidden costsCore cannot be bought monthly. Feature quotas reset monthly; extra enterprise capabilities such as parameter passing can be separately purchasable, and sales tax may be added.

verified 2026-08-12 · source ↗

questions
Vibecode Bitly

Yes. A competent AI coding agent (Claude Code, Codex, Cursor) can build a usable personal Bitly replacement in one session with the prompt on this page. It runs on your own machine or server with no subscription.

How much does Bitly cost?

Bitly costs about $35/month (Growth, checked 2026-07-30), which is $420 per year. That's what you save by replacing it with one prompt.

What do I lose by replacing Bitly?

Honestly: links that outlive your own infrastructure · a domain you stop renewing takes every link with it; bit.ly's recognition in the link itself, which cuts both ways now that shorteners get spam-filtered; bundled QR code management, landing pages, and campaign grouping; city-level and device-level analytics rollups without building them; an SLA and someone to call. If any of those are load-bearing for you, keep paying.

Is there an open-source alternative to Bitly?

Yes: Dub (Bitly with deeper attribution; self-hosting means recreating half a startup's infrastructure.) Sink (A polished Bitly clone on Cloudflare; free hosting, several bindings, and no server to patch.) Shlink (Branded links, routing rules and serious click stats in one container; the QR endpoint is living on borrowed time.) All 4 curated free alternatives are at vibecodeit.com/bitly/alternatives. The prompt is for when you want it exactly your way.