Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Servers and backend infrastructure

Build your own URL Shortener

A URL shortening service with an API, redirects, unique short codes, rate limits and click counts.

  • Intro
  • About 4–8 h
  • 4 checkpoints
  • 1 tutorial · Nim

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

The classic first system design exercise is also a good first build: ID generation, a key-value lookup on the hot path, caching and abuse prevention, in a few hundred lines.

You will be able to

  • Generate short unique codes (a counter in base62, or random codes with collision checks).
  • Serve redirects with the right status code and caching headers.
  • Validate submitted URLs and rate-limit link creation.
  • Estimate storage and read/write traffic for your design.

Skills it exercises

Recommended on Backend Engineer and System Design.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    Create and redirect

    Done when: POST /links returns a short code, GET /<code> redirects with 301 or 302 (and you can say why), and unknown codes return 404.

  2. Checkpoint 2Self-check

    Unique codes

    Done when: A test creates 100,000 links without a duplicate code.

  3. Checkpoint 3Self-check

    Validation and limits

    Done when: Only http and https URLs are accepted, and more than N creations per minute from one client return 429.

  4. Checkpoint 4Self-check

    Stats and caching

    Done when: Clicks are counted without slowing redirects (batched or asynchronous writes), and hot links are served from a cache.

Stretch goals

  • Custom aliases and expiry dates.
  • A one-page capacity estimate for 100 million links.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: Nim). They open on the author’s site.

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.