My Final Round of URL Rewrites⦠Ever.
Tweaking how I handle my domain so my life is simpler for future redesigns.
Assumed Audience: web development nerds like me.
Those of you subscribed to my RSS feed most likely saw a bunch of posts again earlier this week. Thatâs because the canonical URLs for the posts on my site changed: from www.chriskrycho.com/<year>/<title slug>
to v4.chriskrycho.com/<year>/<title slug>
. So, for example, my announcement that Iâm speaking at All Things Open 2019 moved from www.chriskrycho.com/2019/all-things-open-2019.html
to v4.chriskrycho.com/2019/all-things-open-2019.html
. I spent much of this past Wednesday working on getting this migration done, after spending a fair bit of time over the last week planning it. Over the course of the next few days, youâll see v1 and v3 start working; v2 is already up as I write this.1
But why, you ask? Because I now haveâat last!âa stable URL design for my website, which will never have to change again. (âAt lastâ I say because Iâve been thinking about doing this since 2015. It feels great to finally have it done.) I care about stable URLs. I want a link to my content to work just exactly as well in 10 years as it does today. Donât break the web! Donât break all the documents that arenât on the web but which point to places on the web! Historically, that has meant that every time I launch a new website design, I have to do a bunch of work to move the previous version of the site and create redirects for it.
No more! From this point forward, my content will always live at a versioned URL. This site is v4.chriskrycho.com
. When I launch the redesign Iâve been working on (very soon!), itâll be v5.chriskrycho.com
.2 When I launch another redesign in 5 years, thatâll live at v6.chriskrycho.com
âand so on. All Iâll have to do at that point is change where www
and the root feed.xml
redirect to, and everything else will just keep working.
The idea isnât new to meâI got it originally from someone else; but I donât remember who because it has been such a long time since I first saw the idea. I had done something somewhat similar when I launched the last version of my site, archiving the previous version at 2012-2013.chriskrycho.com
, but I failed to start the new version at a similarly specific location. What this means is that I had to take and redirect every piece of content that lived on what is now v3.chriskrycho.com
from www.chriskrycho.com
to its new home. Now, as Iâm preparing to do the v5
launch, I had to do the same again, but this time for what is now at v4
!
I donât want to do this again! Even with building a small tool to generate either file-based or Netlify redirect rules, getting it right is both time-consuming and error-prone, especially when also needing to do a DNS migration to create v4.chriskrycho.com
and get myself off some old shared hosting and⦠it was a pain and a lot of manual work.3 The new approach means I will never have to do this again, and I cannot express just how happy that makes me.
So: v4
it is for now, and v5
coming soon. When that happens, youâll see an announcement post in your feed, and then youâll automatically be switched over to the new root feed on the v5
site, without having to do anything at all. ð
For very long-time readers: I also used this as an opportunity to get my old 52 Verses site off of Bloggerâs infrastructure and into a purely-static-HTML setup as well. Happily, that one doesnât involve any URL tweakingâjust extracting the content from Blogger and pushing it to a static site host.â©
Feel free to watch that space as I iterate on it! Itâs coming together nicely but still has a long way to go.â©