DNS Records

Demystifying DNS Records – A, CNAME, ALIAS, MX & AAAA

So AWS Aspirants, how’s your preparation going on for AWS Certification exam? In this blog, we’ll demystify the DNS Records to help you with your AWS certification preparation. DNS Records is one of the basic topics that you should know for any AWS Certification Exams. Note that for AWS Certified SysOps Administrator exam, it is a must-read topic.

Whizlabs always encourages aspirants to ask questions and submit their queries whatever they come across while preparing with our practice tests or online courses. Our team of certified subject matter experts is always ready to answer the questions. As we submit detailed answers to the query, we thought to post the queries we receive with a detailed solution here on our blog for our readers too.

AWS Certified Solutions Architect Associate Online Course

Here’s a question that we’ve recently received (Nov 2018) from one of our existing customers:

Question Statement:

I’m preparing for an AWS Certifications examination. While practicing the Whizlabs Practice Tests, I often come across DNS records viz.  A Record, CNAME, MX Record, Alias, and AAAA Record. These records sound a bit confusing to me. Can I have a summary of when to use A Record, CNAME, MX Record, Alias or AAAA Record? Practical examples would help.

DNS Records

Solution: An Explanation to DNS Records with Practical Examples

The DNS records can sound a bit puzzling for beginners. So, here we compile a brief explanation of the DNS records in plain English that will help you to prepare for any AWS certification exam. Hope this post will help you in grabbing a few bonus marks in your certification exam.

A Record

A record (or Address record) value is always an IP address. The IP should be static i.e. it should not change frequently. For example, Elastic IPs in AWS are static IPs.

Use Case:

  • A record will be used to map your root/naked domain-name viz example.com  to  Elastic IP say 198.51.100.77.
  • You can map an IPv4 Public IP with A record. But it is not recommended as Public IP can change when you STOP & START an EC2 instance.

CNAME Record

CNAME record maps a name to another name. It can never be an IP address. Let’s understand it with a common use case from the industry.

Use Case:

You can point example.com and www.example.com to the same website hosted at the same server. Here’s how it is generally implemented:

  • An A record for example.com (i.e. root/naked domain) points to the server IP address
  • A CNAME record for www.example.com points to example.com

To simplify it we can say that example.com points to the server IP address using A record, and www.example.com points to the same address via example.com using a CNAME record. (Read Now – CNAME vs Alias)

Now if the IP address of the server is changed, you only need to update it in one place: just edit the A record for example.com, and www.example.com automatically inherits the changes.

Having trouble in understanding any AWS topic? Join Whizlabs Forum and ask your query or write us at support@whizlabs.com. We’ll be happy to provide you answer with a detailed explanation. 

Alias Record

Alias record is an Amazon Route 53-specific virtual record.  So, it works only with Amazon Route 53. Whenever you come across questions related to mappings of Amazon specific resources/ services say Amazon ELBs (Elastic Load Balancers), Amazon CloudFront distributions, AWS Elastic Beanstalk environments, or Amazon S3 buckets that are configured as websites, it should ring a bell for you to consider Alias record in Route 53.

Alias records may sound similar to CNAME but they’re different.

aws certified sysops - free test

Alias Record vs. CNAME Record

Alias records are similar to CNAME records with a minor but important difference. Alias records are there to solve a specific issue described below:

AWS Elastic Load Balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, or Amazon S3 buckets – all these services offer you a DNS Name (i.e. a DNS name like: “MyELB-123456-<aws-region>.amazon.com” & not an IP address).

Now if you want to map your naked/root domain example.com to your Elastic Load Balancer what options do you have? From the above discussion, do you remember that A records allow only IP addresses whereas CNAME records though they allow names cannot be mapped with a root or naked domain! (Read the last line carefully until you understand it).

Yes, you might have understood it by now. To sort out this issue Amazon came up with a record known as Alias record in Route 53 which handles this issue. Alias record will allow ELB DNS name (or any other DNS names produced by AWS services like CloudFront, S3 etc) to be mapped with the root domain name in Route 53.

  • A CNAME can’t be used for naked/root domain names. Root domain names must be mapped with either an A record or an Alias record (in Route 53).

AAAA Record

AAAA record is similar to an A record but it is for IPv6 addresses (whereas A record is for IPv4).

  • Elastic IPv6 addresses are not supported.
  • The format of IPv6 is 128-bit, 8 groups of 4 hexadecimal digits.

MX Record

MX records (Mail Exchange records) is used for setting up Email servers. MX records must be mapped correctly to deliver email to your address.

Summary

Here’s an image that summarizes the DNS records that we discussed in this blog:

DNS Records

For More information Refer: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html

DNS records is an important topic that you must fully understand for AWS certifications. Hope this simple explanation has helped you understand the topic well. We at Whizlabs are always determined to help you in your AWS certification preparation. With the same purpose, we’ve prepared AWS Certifications training that will give your AWS certification preparation a new edge.

Other Helpful Resources

Simplifying Ephemeral Ports with Example

S3 One Zone IA vs S3 Standard IA – Which One to Use and When?

Route 53 Policies: Latency-based Routing vs Geolocation Routing

Along with Whizlabs online course and practice test series, you get 24*7 support from our team of certified, subject matter experts. So, join us today and lay the foundation of a certified future!

Having trouble in understanding any AWS topic? Just mention in the comment below or submit at Whizlabs Helpdesk, we’ll provide you answer with a detailed explanation. 

About Pavan Gumaste

Pavan Rao is a programmer / Developer by Profession and Cloud Computing Professional by choice with in-depth knowledge in AWS, Azure, Google Cloud Platform. He helps the organisation figure out what to build, ensure successful delivery, and incorporate user learning to improve the strategy and product further.

11 thoughts on “Demystifying DNS Records – A, CNAME, ALIAS, MX & AAAA”

  1. Explanation is very clear. I was confused about these DNS records until today no matter how many times i read documentation or some other stuff online. No confusion on this any more. Thanks much for detailed explanation.

  2. Thank You! These topics are fully technical (Asked by our users) and covered by our AWS Experts. These topics will be very useful for your aws certification preparation.

  3. Thank you! Apart from this, if you have any query, please ask in our forum – ask.whizlabs.com or you can send a mail at support@whizlabs.com

  4. Sherill Skowron

    I’m very happy to discover this page. I wanted to thank you for ones time for this particularly fantastic read!! I definitely savored every bit of it and i also have you saved to fav to see new stuff in your blog.

  5. Eusebio Weingartner

    I was very pleased to uncover this site. I want to to thank you for ones time just for this fantastic read!! I definitely appreciated every little bit of it and i also have you book-marked to look at new information in your blog.

  6. Wonderful explanation. I am so happy to know about this site. Thank you so much for making these topics so easy for the readers.
    Looking forward to seeing more topics with similar explanations.

Leave a Comment

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

Scroll to Top