Unshorten (expand) short URLs with Node.js
?? Luciano Mammino
Senior Architect at fourTheorem, AWS Serverless Hero, MVP, Author, Speaker
Short URLs have been an invaluable tool for social media marketing for so many years and we are now used to seeing them everywhere. Most of the credit probably goes to URL shorteners services like Bit.ly, Goo.gl, YOURLS and Rebrandly that popularised the concept and made easy for everyone to start creating short URLs.
When working with URLs in some automation scenarios like analytics, information crawling, data retrieval, etc. it can be important to resolve (or "unshorten" or "expand") short URLs, which means retrieving the original long URL.
In this article, we are going to see how short URLs work and how we can "expand" them into their original URL.