Race.tw uses GitHub and Netlify as a URL shortener for personal use. The method is to use Netlify's _redirects file to do the redirection, please refer to “Redirects and rewrites - Netlify Docs” for more details.

Generally, a single _redirects file is all that's needed for a site to be able to redirect, but you can refer to netlify-shortener to build it.

So for this example, when you go to https://race.tw/FH4, it redirects you to https://store.steampowered.com/app/1293830/Forza_Horizon_4/.