URL shortener
A service that creates a short alias for a long link and redirects to the original.
Example
bit.ly/3I71d3o replaces a 60-character link.
Test yourself: URL shortener
Designing a URL shortener
What does a URL shortener do when someone visits the short link?
bit.ly/3I71d3o takes you in 1 hop to the original 60-character link.
Designing a URL shortener
When a short link that exists is visited, the server answers with code ___.
301 is a redirect: it tells the browser «go to this other link». 404 would be if the link didn't exist.
0/2
â–¶ Play