How to Create a Simple Personal URL Shortener with GitHub and Netlify

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.

  1. Create a GitHub and Netlify Account
  2. Create a new repository, name it whatever you like. Mine is links.
  3. Go to Add File and click Create New File
  4. Name the file _redirects.
  5. 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
10. Deploy.
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.

Front End Web Developer, Graphic Designer, Researcher, Content Creator, Entrepreneur and Ethical Hacker