inkel

Migrating DNSimple ALIAS records to AWS Route53

2min.

Last week I was tasked with migrating a DNS zone from DNSimple to AWS Route53. Overall it was pretty straightforward except when I had to migrate two ALIAS records. This is a special type of record that’s not part of the DNS specification, so there was no direct alternative.

Subdomain

Say that you have a subdomain www.example.com that was using an ALIAS record pointing to www.example.net. This is by far the easiest to move, as it implies replacing the TXT record defining the alias for a CNAME.

Apex domain

This is were it gets complicated. If you had an ALIAS for example.com to example.net you cannot replace it with a CNAME, because apex domains do not support that. The solution is to use an A record, which loses the value of an alias you would need to keep updating the IP address of the destination of it ever changes.

Summary

As you can see it’s not that complicated to migrate ALIAS records to AWS Route53, however, they do have some limitations. I’ve went from this

www.example.com. 3600 IN TXT "ALIAS for example.net"
example.com.     3600 IN TXT "ALIAS for example.net"

to this

www.example.com.    3600    IN  CNAME   example.net.
example.net.        3600    IN  A       192.168.14.52

and achieved the expected results, though we now need to keep an eye on the IP address of the destination.