This little article is more for my own reference if I need it later, hopefully it will be helpful to others
I’ve had to migrate from CPANEL to Azure DNS, partly because I needed to support CNAME flattening which is what Azure uses when you want to connect the apex domain to Front Door.
Getting hold of the Domain Zone file from CPANEL was a lot harder then it needed to be. You actually have to backup the whole of your CPANEL download the file it generates and then find the Zone file. There is a handy article on how to do that here.
Importing the Zone file was also not as simple as it should be. While Microsoft provides a quick tutorial on how to set up your domain in Azure DNS they don’t give much help on what could be wrong when you import the Zone file for your domain. In my case Azure DNS did not like the Zone file I tired to import and I ended up having to get GitHub Co-Pilot to look at the file for me. To be honest I couldn’t quite workout if Co-Pilot was helpful or hindering me more. But it did give me some pointers. For some reason Azure DNS was being picky about domains that ended with a ‘.’ which was odd as I had assumed all domains should end with a ‘.’. Another issue Azure DNS had and it only mentioned this after the import had happened, was that it could not import any of the TXT records. It gave me this rather helpful error message below.
The provided package body for record set of type 'TXT' is not supported in version '2023-07-01-preview'
Co-Pilot recommended that all TXT records values should be in quotes. CPANEL does not store them in quotes so I manually transferred these records after.
I also faced the following error. I made sure I was not referencing the domain name in the value of the TXT records. Strangely for some reason this error message only went away when I removed the old NS records.
