fun with redirects

If you have a website, what are your earliest meaningful links that still work? I have almost no broken links at least since 2012 because I usually add a redirect whenever something changes.

Redirects help links in a healthy web resolve, avoid rot, and last a long time, but they also increase agency by letting own your data (own your URLs).

own your links

When I link to a platform I don't control, I try to at least use a URL that I do control. I have found this useful in recent years when switching my newsletter provider (/list), Mastodon instance (/mastodon), or crowdfunding platform (/fund)–I didn't have to change any links when that happened.

I'm considering even my Twitter account (/twitter in case the site goes bankrupt, and GitHub repositories (/hyperdraft-source) or YouTube videos (/strolling-0172-video) in case I start self-hosting; neither has happened yet, but if it occurs, I can easily update the destination once and point it somewhere else retroactively.

self-hosting a link manager

about 300 links managed with YOURLS

My links tend to be readable, but I like Derek Sivers' idea of making them short and speakable. I use YOURLS one-click self-hosted via Cloudron to manage my redirects which makes it easy to have both short and speakable if necessary; the links technically are something like go.rosano.ca/whatever, but because I own the data, I can make it further accessible under my root domain, as rosano.ca/whatever is often shortest, simplest, and most memorable. I also do the same contraction with blog permalinks so that utopia.rosano.ca/interoperable-visions/ can be accessed at rosano.ca/interoperable-visions; I stick with Ghost's simple permalinks design of /post-title-as-a-slug and find it more readable and predictable.

self-hosting legacy redirection

For legacy domains and permalinks, I made a simple single-file Node.js Express app (git push self-hosted via CapRover). There are about two dozen domains pointing to the same app to handle:

  1. removing www.
  2. correcting old and mispelled domains
  3. redirecting archived projects to a single page
  4. masking a domain that functions as a landing page
  5. redirecting PeerTube links to YouTube
  6. redirecting gibberish slugs to friendly slugs
  7. redirecting to the Wayback Machine as a last resort, (but I may have done this one incorrectly, as it might cause some recursive issues).

This is hopefully a graceful degradation that takes care to guide existing links somewhere useful. It also supports HTTPS so if you write https://[OLD_DOMAIN] it works, which is not the case when you 'forward' URLs via registrars like Hover who only support writing http://[OLD_DOMAIN].

static versus dynamic

I love the simplicity of static sites and how they're basically free to keep alive forever, but all of my redirect pipework makes me feel forever tied to dynamic systems. It's possible to redirect via meta refresh on a static page but I find it ugly to write and manage with HTML; I'm also not sure if all search engines understand them, although Google claims to yet still recommends server-side redirects:

This tag, commonly called meta-refresh, sends the user to a new URL after a certain amount of time, and is sometimes used as a simple form of redirection. However, it is not supported by all browsers and can be confusing to the user. We recommend using a server-side 301 redirect instead.

conclusion

Maybe it's the librarian in me that finds it fun to have my stuff organized and moving along smoothly. I like the sense of ownership that comes with being able to direct links where I want, and the care to avoid throwing visitors into the weeds by making sure they land somewhere useful, always and forever.


If you want to keep reading, learn about the difference between fragile data and durable data, dream some interoperable visions with me, or marvel at how the person who wrote this needed six tries to learn iPhone programming.