5.1 DNS 101
Last updated
Was this helpful?
Last updated
Was this helpful?
DNS is used to convert human friendly domain names into an Internet Protocol address. IP addresses are used by computers to identify each other on the network.
VPC now is IPv6 compatible.
Top level domain names: .com, .edu, .gov, etc. These top level domain names are controlled by the Internet Assigned Numbers Authority (IANA) in a root zone database which is essentially a database of all available top level domains.
Second level domain names: .com.cn, .com.uk, etc
Domain Registrars: because all of the names in a given domain name have to be unique there needs to be a way to organize this all so that domain names aren't duplicated. This is where domain registrars come in. A registrar is an authority that can assign domain names directly under one or more top-level domains. These domains are registered with InterNIC, a service of ICANN, which enforces uniqueness of domain names across the Internet. Each domain name becomes registered in a central database known as the WhoIS database. Some famous domain registrars such as GoDaddy.com and so on.
SOA (start of authority) Records: The SOA record stores information about:
The name of the server that supplied the data for the zone.
The administrator of the zone.
The current version of the data file.
The number of seconds a secondary name server should wait before checking for updates.
The number of seconds a secondary name server should wait before retrying a failed zone transfer.
The maximum number of seconds that a secondary name server can use data before it must either be refreshed or expired.
The default number of seconds for the time-to-live (TTL) file on resource records.
NS Records: NS stands for Name Server records and are used by Top Level Domain servers to direct traffic to the Content DNS server which contains the authoritative DNS records. What essentially happens is when you create a zone in Route53, you are going to given a lot of different NS records, you then have to take these records to your domain registrar, so using GoDaddy for example, you will go into the GoDaddy console, but essentially what you do is you take those records and you supply your domain registrar with these NS records and then in that way traffic will be directed over to Route53. Now recently, Amazon has become a domain registrar and it makes it a lot easier for you because previously you'd have to go through and use ike GoDaddy registered domain name and then basically you would have to go to create the zone in Route53, get all the NS records then update GoDaddy with DNS records in order to get this to work. But now it's all integrated into the AWS console. We can just use AWS as our domain registrar.
A records: An "A" record is the fundamental type of DNS record and the "A" in A record stands for "Address". The A record is used by a computer to translate the name of the domain to the IP address. It is important to understand that an Elastic Load Balancer never has a IP address, ELB always just have a DNS name. So you could not use A record to resolve to an ELB. What we actually use is Alias record.
TTL: The length that a DNS record is cached on either the Resolving Server or the users own local PC is equal to the value of the "Time To Live" in seconds. The lower the time to live, the faster changes to DNS records take to propagate throughout the Internet. When you do a DNS migration, set the TTL to a lower value, say 300 seconds, so that the request will not be sent to old sites.
CNAMES: A Canonical Name (CName) can be used to resolve one domain name to another. For example, you may have a mobile website with the domain name "" that is used for when users browse to your domain name on their mobile devices. You may also want the name "" to reolve to this same address.
MX Records (Mail Exchanger Record): Route53 also support MX Records.
ELB's do not have pre-defined IPv4 addresses, you are not given a IP address when you create a ELB, you are always given a DNS end point, so you always resolve to ELB using a DNS name. That can cause problems because if you have got "acloud.guru" which is a naked domain name, you always need a IP address to resolve that domain name too. So what Amazon do? They just created Alias records. So Alias records allow you to resolve a naked domain name which is sometimes referred to as the zone apex record to a ELB's DNS address and that's where you are going to see Alias records most commonly used.
Understand the different between an Alias Record and a CNAME. The different is that when you are making a request to Route53 for a DNS record you are going to be charged for that request if you using CNAMES. However, if you are making a request and it is an Alias record, you won't be charged. For that reason, when you go into the exam and you read through these scenario questions it will ask you that should you use an A record here or should you use a CNAME here or should you use an Alias record. Most of time you want to choose an Alias record, because you don't get charged for it, and it does allow you to map your naked domain name back to an ELB.
Given the choice, always choose an Alias Record over a CNAME.
There are only 50 domain names available by default, however it is a soft limit and can be raised by contacting AWS support.
Route53 currently supports the following DNS record types:
A (address record)
AAAA (IPv6 address record)
CNAME (canonical name record)
MX (mail exchange record)
NAPTR
NS (name server record)
PTR
SOA (start of authority record)
SPF
SRV
TXT (text record)
Alias Records: This term is created by Amazon, so only be used in AWS and Route53. Alias records are used to map resource record sets in your hosted zone to Elastic Load Balancer, CloudFront distribution, or S3 buckets that are configured as websites. Alias records work like a CNAME record in that you can map one DNS name to another target DNS name. Key difference - A CNAME cannot be used for naked domain names (zone apex record, i.e. the naked domain name means the domain name without any prefix such as www). Your naked domain name must be an A record. You cannot have a CNAME for naked domain names (like ""), it must be either an A record or an Alias. Alias record sets are supported only for DNS record types A and AAAA. Alias record automatically map your naked domain name or use zone apex domain name to an ELB and that's where it's most commonly used (i.e. Alias Target is the domain name of your ELB). Alias resource record sets can save you time because Amazon Route53 automatically recognizes changes in the record sets that the alias resource record set refers to. It's just an easy way of mapping your naked domain name to an ELB, and this is most commonly used in production.