DNS routing traffic for subdomains using AWS Route 53

Long explanation in AWS Routing traffic for subdomains – Amazon Route 53

GROUND RULE or RULE OF THUMB of DNS, NEVER change the NS record of your domain in your Domain registrar before completing setup of your DNS server. The result may cause 72 hours of outtage.

Using my domain karmeng.my as an example, the objective is to have chow.karmeng.my to be a valid domain for email hosting which offers customed domain.

Let say, I wanted to create a vanity email me@chow.karmeng.my , default DNS settings in AWS Lightsail does not allow such customization of DNS by allowing a subdomain with a MX record to be created in AWS Lightsail DNS.

Therefore, in order to accomplish such feat, AWS Route 53 are chosen.

First I will need to create 2 DNS Zones in AWS Route 53

Then, in each of the zone create an A record that points to my AWS Lighsail instance static IP.

Based on the article, Routing traffic for subdomains – Amazon Route 53

Create NS records in the parent domain which points to the NS records of the subdomain.

Take the record of the NS from your sub domain, in this case, chow.karmeng.my

Create NS records for the subdomain in the parent domain, in this case, karmeng.my

Once, the NS are added into the parent domain. Do change the NS of your domain from your domain registrar, do take note that the UI to change your domain NS differs from domain registrar to domain registrar.

Finally, test and verify from your local machine.

Check it from your host/server in AWS

Right now both localhost and server in AWS shows everything looks good and dandy. Do check again if in doubt, as DNS propagation will take time to have the effect take into the entire internet. This concludes how to perform DNS routing traffic for subdomains using AWS Route 53.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.