sunnysingh
7 months ago

Use Netlify for a free and simple URL shortener

I use Kent C. Dodd's netlify-shortener tool to setup a free URL shortener on Netlify.

It works by updating a _redirects file in your repository with a CLI command, so I can type shorten https://sunnysingh.io/blog/readable-code my-short-name and it will deploy and copy https://sunny.link/my-short-name to my clipboard.

It's also possible to create a web interface for this as well, but will take a bit more time to setup versus the few minutes with netlify-shortener.

Feel free to look at my URL shortener repo to see how few things are needed to get it working: https://github.com/sunnysingh/sunny.link

Do you have any comment on this tricks? then let the author know about that. comment here