My process of migrating this blog to steffo.blog

And why DNS wasn't such a huge issue for me this time.

My process of migrating this blog to steffo.blog

A few weeks ago, I thought it would be cool if this blog had a better domain. I was, to be honest, a little bit jealous when I saw other blogs that had .blog domains. So... I thought about getting steffo.blog. But before I did this, I had to prepare something.

Preparing the DNS

As I planned to migrate the domains as soon as I got the domain, I had to prepare something in the DNS settings for steffo.dev. The TTL for my domains is normally set to 86400 - that's 24h. I wouldn't want to wait for so long just for all the RSS Clients to not be able to find the new domain. So I changed it to 3600 - so one hour.

Acquiring the domain - and setting the first DNS settings

Since I'm hosting all my stuff with netcup, buying the domain was straightforward. Entering the name of the domain that I wanted, assign it to my web hosting (even though I'm not using the web hosting service to run ghost) and you're almost done. Because I had to first wait a little bit until the domain was actually mine - though I didn't have to wait for so long, as it took maybe 5 to 10 minutes.

When I finally got my domain, I quickly changed the DNS settings for @ and *, before anyone could even open `https://steffo.blog` in a browser.

When that was finished (and the DNS changes were live), I got my certificate, updated my nginx config and definitely hadn't forgotten to update the URL in the Ghost config. So I had to change it in there too. (Ghost uses that to set the URL in images and links.)

Redirecting the old domain

At this point, steffo.blog was live, and blog.steffo.dev gave a "wrong certificate" warning, as the default certificate (in the 404-error of my nginx config) is for a different domain. Whoops. I need to change that! As soon as possible!

So, adding an A and AAAA entry for blog to the DNS settings of steffo.dev, and adding a new subdomain to my web hosting (via Plesk): blog.steffo.dev, which redirects with an 301 Moved Permanently, so not only old bookmarks will redirect to the new domain, but also RSS readers will hopefully update the domain to the new one. (I couldn't check that, but I hope it works?)

The issue is: I couldn't test directly if the redirect worked. And as I found out an hour later, it didn't. Because: I still needed to get a certificate for blog.steffo.dev, as Plesk didn't have it yet - so it self-signed it, apparently. The problem is: I was unable to do that until the DNS cache has been cleared. So when I noticed that it did that (by seeing that is now shows a "this is self-signed" instead of "wrong certificate" error), I could simply ask Plesk to get a certificate from Let's Encrypt, and... voilà, it works.

Finishing it up

When everything finally worked again, I changed the TTL of both domains (steffo.dev and steffo.blog) back to 86400, and posted the news of the new domain on the Fediverse. And ... well ... it got shared a lot!

But this is now the end of this story. I didn't really have issues with the DNS (does the one with the redirect, as I had to wait for the cache, count as one?) and I'm really happy about the new domain. And even though this post is probably way too small, I hope at least someone found it interesting. 😅