(Originally published elsewhere in 2019) When you have a domain hosted at a register or other DNS service and want to create a subdomain hosted in Route 53 but do not want to move the parent domain then do the following.

AWS Route 53

In this example, I assume you have a domain, e.g. lovescatsnotarealdomain.com and you do not want to transfer it to Route 53. All you want to do is create a subdomain e.g. mysubdomain.lovescatsnotarealdomain.com hosted and registered within Route 53.

In Route 53, create a new hosted zone mysubdomain.lovescatsnotarealdomain.com. You will be provided a SOA record and NS records in this hosted zone. Create a further subdomain record set in this domain if you so choose at a later time.

Do not create a hosted zone for lovescatsnotarealdomain.com in Route 53 for this scenario.

Update DNS Service

Copy the 4 nameservers from the record created above. At your domain register / DNS Service proceed to create 4 NS records for the subdomain - do not create a CNAME at the DNS Service, only NS records.

Wait. For DNS that is.

In the meanwhile create either an A record or an Alias in the Route 53 hosted zone for the domain. That is, a) create an EC2 and assign the A to the IP address or b) map an ELB via an Alias.

Wait. For DNS.

DNS…

At some point running a DIG NS mysubdomain.lovescatsnotarealdomain.com will result in NXDOMAIN error, but eventually you will get a full result showing the resulting NS changes.

Open mysubdomain.lovescatsnotarealdomain.com in a browser and you should be greeted with the service you configured against the subdomain in an earlier step.

This makes it really easy and no need to migrate the entire domain zone to Route 53. A really flexible option.

Architect Forward (architectFWD™)


Originally published elsewhere on 08 July, 2019.

Quintes van Aswegen

Quintes van Aswegen

22+ years experience in solving business problems and maximising opportunities through technology in a variety of industries, public and private sector internationally. I founded architectFWD™ to provide knowledge and trusted advice in the areas of strategy, technology, cloud and digital to enable organisations to become Digital Leaders.