Now that we have our records, let’s think of how to use them in the new server. In the above example, we list test.com as a zone. And in that zone we have an A record for test.test.com and a CNAME for testalias.test.com that points to test.test.com – but we don’t know where test.test.com resolves to. Each of those domains has a corresponding file that starts with db. followed by the name of the domain in the /Library/Server/named directory. So we can cat the test.com file as follows:
forwarders: 22.214.171.124 126.96.36.199
no resource recs
Now we know the IP address that each record points to and can start building them out in other systems. If you only have 5-20 records, this is pretty quick and easy. If you have hundreds, then you’re in luck, as those db files per domain are portable between hosts. Some of the settings to look out for from macOS Server include:
test.com. 10800 IN SOA test.com. admin.test.com. (
10800 IN NS test.test.com.
10800 IN MX 0 test.test.com.
test.test.com. 10800 IN A 10.0.0.1
testalias.test.com. 10800 IN CNAME test.test.com.
krypted March 31st, 2018