Until 2015, my blog was at sparsebundle.net. I eventually decided to change where my blog was located, so I moved it over to jordanmerrick.com, making sure to keep the URL structure the same.
I used to host jordanmerrick.com on a fairly standard web server at DigitalOcean. This server had an additional host configured for the sparsebundle.net domain which simply redirected any sparsebundle.net links to the equivalent jordanmerrick.com version. Nowadays, I use a git-based workflow and host the site with Netlify, so redirecting sparsebundle.net links is done differently.
I use DNSimple to manage the DNS records of my domains. The service offers a useful URL record that redirect entire domains from one to another while retaining the URL path. Anyone trying to find an old sparsebundle.net blog post are redirected to the post located here. It’s a really simple solution to something that is often more complex than it feels it needs to be.
The redirect functionality doesn’t work to, or from, HTTPS URLs, though sparsebundle.net never used SSL in the first place. Although jordanmerrick.com does use SSL, any non-HTTPS links are gracefully redirected to HTTPS by Netlify.