Design a URL shortener
medium 45 minTurn a long URL into a short code and redirect anyone who opens it.
Where it shows up
The same pattern appears across everyday software.
Marketing links
Short links in SMS, print and QR codes, where length matters and per-click counts tell the team which channel worked.
Platform link wrapping
Social and email platforms rewrite outbound links through their own short domain so they can scan destinations for malware and count clicks.
Branded domains
Companies point a short domain of their own at the service with a DNS record; the service proves ownership and issues the certificate.
QR codes on paper
A printed code cannot be edited, so it points at a short link whose destination can be.
Link rot when a service closes
When a shortener shuts down, the links it issued stop working. Google's goo.gl stopped taking new links in 2018-2019, which is why durability belongs in the requirements.
Phishing and abuse
Short links hide their destination, so shorteners scan on create, re-scan later and disable bad links quickly.