
To create this short link on my own domain I use a feature provided by Netlify, where I host my site.

I like the link to be meaningful and short to help people find their way to a page on Speakerdeck or a Google Slides presentation or anywhere with a URL too long to jot down during a talk. During conference talks I often include a link to my slides.

The site actually just represents the automation of what I had been doing manually for some time. If you’d rather go further with your experimentation, and deploy your own version to play with, you can do that with just a couple of clicks thanks to the button below. But remember, this is a demo, so the links you create there might not last forever. You can see what the end results look like and give the URL shortener a whirl on this demo site. I also want to be able to have recognizable, branded URLs on my own domain. I want the ability to easily make my own short URLs which won’t go dead if some service outside of my control gets retired. But it is also me scratching an itch to have my own URL shortener which does not depend on an external service. This post is part tutorial part proof of concept, exploring some interesting uses of the features on Netlify. They also introduce an extra database query and DNS hop to the journey made when following a link, and typically they create links which are not related to your own domain, which could be a nice facility to have. But all of them depend on a third-party service. Some offer more facilities than others, with things like custom short codes and analytics. There are many to choose from -, ,, and more. Most of the time, the existing solutions are just fine. But instead of it being hosted by somebody else, this is an example of one that you could host for yourself.

Chances are you’ve used one in the past in order to turn some long, unfriendly looking URL into something memorable or short enough to type, dictate, or just for an easier copy and paste. There are lots of URL shorteners out there. It was rather fun, and you can create yours using the tutorial below. Armed with Netlify’s Functions, Redirects, Forms, API access, Deploy Hooks, (and a little imagination), I decided to roll my own URL shortener. Netlify’s recent release of support for serverless AWS Lambda functions prompted me to consider what might now be possible that was previously quite difficult.
