A few days ago Google announced that they will close their url shortener service goo.gl. So despite that there is a lot of such services around I decide to create my very own branded url shortener. It's a javascript based but powerfull enough for my needs.

You can see it in action here at tondy.net/src

My idea is to create a virtual site with consistent url layout like tondy.net/contact including all my sites, image/file hosting services, social networks that I use or I will use in the future. Also I can put links in bulgarian as you can see my loved spanish joke translated in bulgarian here at tondy.net/виц
And of course as a starting point for my still under development baby AbvOS :)

How to create your own url shortener

Basically you need a domain (freenom.com), cloudflare account and a place to host one static html page (github, gitlab, cloudup.com, neocities.org, etc). Optionally Google Analytics or similar
You can use my html file as template

Change your domain name servers to Cloudflare

My Cloudflare Page Rules

  1. tondy.net/*x* go to https://tondy67.github.io/u/$1.html?$2 (tondy.net/goxcontact)
  2. tondy.net/* go to https://tondy67.github.io/u/?$1 (tondy.net/contact)

The "url database" is a simple unordered list of links. You have to change it with yours of course

Example:
<a href="GO_HERE">THE_SHORT_URL</a>
<a href="https://tondy67.github.io/en/UrlShortener/">url</a>
The result: tondy.net/url go to https://tondy67.github.io/en/UrlShortener/

That's it! Have a nice day and happy url shortening :)