Hey guys. How are you? Hope you are safe!
Today I’d like to help you build an URL shortener. 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
6. Feel free to use TAB to properly space it otherwise use 5 spaces.
7. Commit the file
8. Now go to our Netlify Dashboard and import your url shortener links repository.
9. Leave deploy settings as is
11. 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.
12. Go back to the Netlify Dashboard and select the new app
13. Now go to Settings, select Domain Management then Add Domain Alias.
14. Follow the instructions from there and you should be good to go.
15. 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.