A personal URL shortener, inspired by Kent C Dodds
Basic steps to get your own shortlinks up and running:
- Pick up a custom domain from a domain registrar like namecheap.com or iwantmyname.com
- Init a repo with a
_redirect
file, with a line like/slug http://example.com
, where the 1st arg is the relative path, and 2nd is where you want to redirect to - Setup a new site in Netlify and link your repo
- Add your custom domain in "Domain Settings"
And thats it!
If you get some 'site not secure' errors, just wait a few hours for the domains and SSL certs to fully propgate thru DNS, but you should otherwise be good!
Bonus steps:
- add
netlify-shortener
as a dev dependency to be able to auto-format when adding new links - add
netlify-shortener
as a shell alias to be enable creating quick short links from the cli