When one computer contacts a name server for information a set of records is returned.
These are the most common type of DNS records.
A Record
DNS A Records map hosts names to IP addresses. A Records are the most common type of DNS records.
An asterisk * denotes a wildcard domain *(e.g. .jason.teamtreehouse.com would point to one server).
The IPv6 version of an A record is called the AAAA record.
MX Record
MX records are responsible for pointing to servers that accept mail messages for a particular domain. They are records that specify how mail should be routed via Simple Mail Transfer Protocol (SMTP).
In other words, they are the DNS records that tell other mail servers how to find your email address on the internet.
Only after you create your first email address are MX records created for your domain. It takes a few hours for them to be set up after the first address is added, so you must wait that long to use the first email address. After that there is no delay when adding an email address.
Priority & Queue
MX records are specified via priority, such as 1, 5, 10, etc.
Backup MX servers hold mail in a queue in case the priority server is not available.
MX records are usually specified via the fully qualified domain name (FQDN).
Example MX Records
Google’s MX Records:
Fully Qualified Domain Names (FQDN)
A fully qualified domain name (FQDN) specifies the name’s exact location in DNS.
The FQDN refers to a whole domain name and ends with a dot (.) like the CNAME.For example, the FQDN of www.google.com is actually: www.google.com.
CNAME Records
It is short for “Canonical Name“, they are used for aliases when creating domain names.
Let’s say that you have a restaurant franchise, and it’s located in different cities.
city1.restaurant.com
city2.restaurant.com
city3.restaurant.com
city4.restaurant.com
city5.restaurant.com
You could use A records to point all of these different subdomains to a single server (i.e. server’s IP address).
Or you could use a CNAME to point them all back to something like www.restaurant.com (i.e. another domain name)
A big advantage of CNAME records is aliasing several domains to one IP address which makes it easier to update in the event of an IP changes.
CName records can also be aliased to hosts outside of the given domain.
CName records are written with a dot at the end.