Before migrating domains to Amazon’s Route53, we should first make sure we properly understand how DNS works
While we’ll get to AWS’s Route53 Domain Name System (DNS) service in the second part of this series, I thought it would be helpful to first make sure that we properly understand just how DNS works in general. Once we’re comfortable with the DNS process and terminology, we’ll explore migrating existing domains to Route53.
The DNS provides mapping between human-readable names (like www.amazon.com) and their associated IP addresses (like 205.251.242.103). DNS can be best compared to a phone book where you look up the phone numbers listed by easier-to-remember names. DNS comes under the application layer protocol.
A user types www.amazon.com in his browser, which then queries the DNS server for amazon.com’s IP addresses. The servers return Amazon’s address so the browser can request data from Amazon’s web host, which returns the elements necessary to build their home page in the local browser.
How DNS Works: Domain Name System Terminology
Domain Names
A domain name is a human-readable name—like amazon.com—that we type in a web browser URL field. The Internet Corporation for Assigned Names and Numbers (ICANN) manages these domain names
Top Level Domain (TLD)
TLD refers to the last part of a domain name. For example, the .com in amazon.com is the Top Level Domain. The most common TLDs include .com, .net, org, and .info. Country code TLDs represent specific geographic locations. For example: .in represents India. Here are some more examples:
com – Commercial businesses.
gov – U.S. government agencies.
edu – Educational institutions such as universities.
org – Organizations (mostly non-profit).
mil – Military.
net – Network organizations.
eu – European Union.
Second Level Domain
This is the part of a domain name which comes right before the TLD—amazon.com—for example.
Sub Domain
A subdomain can be created to identify unique content areas of a web site. For example, the aws of aws.amazon.com.
Domain Name Registrar
By managing domain name reservations, name registrars are critical to how DNS works. ICANN currently grants permission to organizations to act as domain name registrars for specific higher level domains.
Name Server
Like a phone book, the name server is a collection of domain names matched to IP addresses.
How DNS Works: Domain Name System record types
A Record
Address record. A Records map server IP addresses to domain names. For example, 72.21.206.6 to amazon.com.
CNAME
Canonical Name record. A CNAME record establishes one domain as an alias to another (thereby routing all traffic addressed to the alias to the target; the canonical address).
Alias Record
Like a CNAME record, Alias records can be used to map one address to another. But Aliases can coexist with other records using the same name.
MX Record
Mail Exchange Record. These records will redirect a domain’s email to the servers hosting the domain’s user accounts. Mail exchange records are used for determining the priority of email servers for a domain.
How DNS Works
When a user types a human-readable address into the browser, the operating system’s DNS client will check for information in a local cache. If the requested address isn’t there, it will look for a Domain Name System server in the local area network (LAN). When the local DNS server receives the query, and the requested domain name is found, it will return the result.
If the name is not found, the local server will forward the query to a DNS cache server, often provided by the Internet Service Provider (ISP). Since the DNS server’s cache contains a temporary store of DNS records, it will quickly respond to requests. These DNS cache servers are called not authoritative DNS servers as they provide request resolution based in a cached value acquired from authoritative DNS servers.
An Authoritative Root Name Server maintains and provides a list of authoritative name servers for each of the top-level domains (.com, .org, etc.).
An Authoritative Top Level Domain Name Server maintains and provides a list of authoritative name servers for all domains (gmail.com, wikipedia.org, etc.). Its job is to query name servers to find and return the authoritative name server for the requested domain.
Now that we’ve got a better idea of how DNS works, the next post will introduce you Amazon’s Route53 and show you how easy it can be to migrate your existing domains to it.