My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How the url-shortener works?

slim's photo
slim
·Feb 21, 2019

Today I used a url shortener bitly in order to send a short link to my friend. However I asked a question: How does this mechanism functions? Given a link like that: google.com/search?biw=1536&bih=754&..:

I think that the bitly service will generate a code for this link to be something like this: bit.ly/2GWhfPZ

So a new link with an ID '2GWhfPZ' corresponding to the given link will be stored in the database (if it will exists)

But when I put the generated link into a browser, how does the browser map the generated bitly link with the real one and returns the result?