Build a Link Shortener with Claude Code

Fast URL shortening service with click analytics and custom domains. Marketers, social media managers, and businesses use it to track link performance and create branded short links.

221,000 searches a month for “link shortener”WeekendA working first version in a day or two

The Claude Code prompt

Build a Link Shortener web app. People search for "link shortener" about 221,000 times a month, plus related searches like "url shortener free", "short link generator", "custom url shortener". The goal is a tool that ranks for those searches and makes money.

What it should do:
Build a link shortener web app. Create a homepage with a large input field labeled 'Paste your long URL here' and a 'Shorten Link' button. When users shorten a URL, show the short link with a copy button and QR code. Add custom alias option and expiration date settings. Display click analytics with a simple chart showing clicks over time, geographic data, and referrer sources. Include a dashboard to manage all shortened links. Use a modern design with blue and green accents. Focus on the URL shortening and basic analytics flow first.

How to build it:
1. Read this folder first. If it is empty, set up Next.js (App Router, TypeScript, Tailwind). Write a short PLAN.md with the pages, components, any library or API you need, and what you are leaving for later. Then build.
2. Put the tool itself on the homepage so a visitor can use it within seconds, with no sign-up. Do the processing in the browser where you can, so it is fast and cheap to run. Look at how Bitly, TinyURL, Rebrandly do it and make ours simpler and faster.
3. Make it rank. Use "link shortener" in the title tag, H1 and meta description. Under the tool, add a short how-to and an FAQ with FAQPage schema, and add a sitemap and robots.txt. Scaffold these programmatic pages from one template and a data file: /link-shortener-for-[platform], /url-shortener-with-[feature], /[industry]-link-tracking.
4. Monetisation: Freemium: 100 links/month, $8/mo unlimited + custom domains. Add a pricing page and the free usage limit, and leave Stripe checkout as a clearly marked stub with the environment variables it needs.
5. Run it locally and test the main flow end to end, including edge cases like empty input and very large files. Fix what breaks, then finish with a summary of what works, what is stubbed and how to deploy it to Vercel.

Paste it into Claude Code in an empty folder. It plans first, so read PLAN.md and steer before it starts building.

What people search for

link shortenerurl shortener freeshort link generatorcustom url shortenerlink tracking toolbranded link shortenerclick analytics tool

Who you're up against

  • Bitly : Leading URL shortener with comprehensive analytics
  • TinyURL : Simple and reliable URL shortening service
  • Rebrandly : Custom domain URL shortener for branding

Pages that can rank

One template, many long-tail pages:

  • /link-shortener-for-[platform]
  • /url-shortener-with-[feature]
  • /[industry]-link-tracking

Content to write

  • How to track link performance with short URLs
  • Best URL shorteners for marketing campaigns
  • Custom domain setup for branded links

How it makes money

Freemium: 100 links/month, $8/mo unlimited + custom domains

More to build

More in SEO & web · Every build idea