How to make your own (self-hosted) URL shortener

Services like Bitly ( and (deprecated) are fantastic. My frequent use of Bitly made me think, “why don’t I do this myself”. Seems easy enough, right? Interestingly I was able to find a few self-hosted link shorteners. The one that caught my eye was YOURLS.

Your Own URL Shortener