Hey guys. How are you? Hope you are safe!
Today I’d like to help you build an URL shortener with GitHub, Netlify and an Affordable Domain Name. So let’s dive right in.
Create a GitHub and Netlify Account
Create a new repository, name it whatever you like. Mine is links.
Go to Add File and click Create New File
Name the file _redirects.
Now create links like this
Feel free to use TAB to properly space it otherwise use 5 spaces.
Commit the file
Now go to our Netlify Dashboard and import your url shortener links repository.
Leave deploy settings as is
Now go to where you’ll be buying your domain name and buy a short domain name. I bought https://stve.xyz from Namecheap at ksh. 600.
Go back to the Netlify Dashboard and select the new app
Now go to Settings, select Domain Management then Add Domain Alias.
Follow the instructions from there and you should be good to go.
I suggest you create a website with the redirects file like mine: Stephen Ajulu’s URL Shortener and Link tree. I actually created a startup where we build for you such sites. Watch this space for the link to build your own. Video coming soon so watch below and sign up to our newsletter to receive updates.
Ajulu’s Thoughts – Delivering Quality Tech, Cybersecurity & Dev Content Since November 2016
I will appreciate it, if you take 10 seconds of your time to check out my donations page and donate to the blog and other causes. 40% of the donation goes to buying this blog an official domain name, the rest goes to charity eg supporting children homes. Any amount received will be shown, from whom and to where it went. I will also include screenshots of inflow and outflow. So go check it out: Donations and donate! You can also buy me something via the wishing list. Thank you and have a wonderful day.
- How to Create a Dev Environment in Windows 10: Part 1
- Resources for Building a Beautiful Progressive JAMstack Blog
- Building a Beautiful Progressive JAMstack Blog Part 2: Day 4 to 7
- Building a Beautiful Progressive JAMstack Blog Part 1: Day 1 to 3
- The 8 Phases of Cyber Security Testing