There are many url shortening services which either look very ugly and hard to use or impossible to find a good short suburl. Everything is already taken :/

I was thinking about writing my own shortener with around 100 lines of python max but I felt so lazy and don’t want to maintain hosting yet another server.

Some jekyll extensions that github-pages support are published on this topic, but I don’t want to install any more extensions so I have ended up in this quick solution with not-so-elegant js redirect. You can also go for meta tags for redirection.

These steps assume that you already have a static site either built with jekyll or plain html serving. If you don’t have it, you can start building from here and publish it for free with github pages or gitlab pages. You don’t have to use jekyll at all.

  • Create a file in the root folder with html extension => test.html
  • Add this as content, changes href to your destination

  	window.location.href = "DESTINATION_URL";
  • Push the changes to your github or gitlab pages.
  • Go to https://domain/test (jekyll automatically drops .html extension) => see the redirection to DESTINATION_URL.

Example: =>

Downside of this solution is that there is no metrics of the link usage :-O.