sagelearnai

Design a URL Shortener

Prompt: "Design a service like bit.ly that turns long URLs into short links and redirects visitors."

The classic warm-up design. It looks trivial, which is exactly why interviewers use it: the grading is in unique code generation, the read-heavy redirect path, and the details you raise unprompted. Try it yourself on a 35-minute timer before reading on.

In this lesson

  • Learning objectives
  • 1. Requirements
  • 2. Estimates
  • 3. Core entities and API
  • 4. High-level design
  • 5. Deep dives
  • 6. Operations and cost
  • 7. What each level adds
  • Self-check

Questions covered

  1. Design a URL shortener in 10 minutes, aloud.
  2. How would you make short codes unguessable but collision-free?

This lesson is part of System Design Interview: Concepts, Patterns & Real Designs. Unlock the full course to read it, take the quiz and track your progress.

See plans →

Last reviewed 2026-11-05.