Note! I have migrated away from ghost blog and now manage my site on hugo!
For some reason when I was looking up how to change [[domain names]] for my ghost blog, I kept running into recommendations that stated I should just reinstall ghost. I really don’t want to do that especially since so much content exists on this server already. It also reminded me that I probably need to take regular backups of the server anyways. Or at least, double book blog posts somewhere just in case! (Truthfully most posts end up in my notebook to begin with, and end up polished on the website). Below are my steps to migrate my blogs DNS record.
Set your new DNS record, a day in advanced to the IP address of your server. In my case I was migrating from https://blog.unorthodoxdev.net to https://unorthodoxdev.net. I created a ANAME record and allowed it to propagate overnight. In the morning, I did the below steps.
ghost config url {new_url}
rm /etc/nginx/sites-enabled/*.conf
ghost setup ssl
ghost restart
Finally you want to visit your website and check your cert and go from there!
I would also like to throw in that you might want to remove your ANAME record for whatever your website was before and upgrade it to a CNAME record. CNAME records are really just a redirect to whatever ANAME record you provide it.