Using Caddy as a link shortener
published: 17 January 2026, tagged: tricks
A few days ago, I was chatting to Cassidy after finding out she plays go, and she casually dropped a link to her profile at cass.run/ogs. I link people to my own OGS account from time to time, but that link looks like online-go.com/user/view/1687228, which is a little tough to remember. Usually I just tell people my username and let them look it up, but that’s a bit more hassle for them.
![]()
seven digits? that doesn't look so bad
Well I guess I could remember my account number, but I use it infrequently enough that it’s easy to forget in between the times that I need it. And besides, I have plenty more URLs that would be useful to have on hand, but that are pretty tough to remember. All this is to say, I really like Cassidy’s idea of a personal URL shortener.
Hers lives, aptly, at cass.run/shortener, but it’s deployed as a Netlify application. I already have all of my domains pointing to my reverse proxy, Caddy, so I’d rather just use that if I can. Turns out it’s actually pretty easy! Just add this to your Caddyfile:
rosy.systems {
map {path} {redirect-uri} {
/ogs https://online-go.com/user/view/1687228
/path https://whatever.other.url.you.like
default https://lucymcphail.com
}
redir {redirect-uri}
}
Replace the domain at the top with your own, and make sure to leave in the default mapping if you want it to gracefully handle paths that you haven’t added a redirect for. It works fine if you don’t, but you’ll get an ugly default error page if you try and hit /wibble or something else you haven’t defined. From there, just add any extra shortened URLs you’d like! Happy shortening :)