For too long there is confusion to all that concerns Domain records. Let’s dive into DNS and grasp its major components and record types.
Understanding Domain DNS Records
Before we try to understand the record types, I want to briefly go over on what are Domain Name Server(DNS).
Domain Name Servers are simply huge scale database servers. Those servers are in charge of resolving our human-friendly text URLs to an address a server could understand (IP ADDRESS).
When I type in a URL in my browsers address bar and hit enter, my action is sent to an internet service provider (ISP). First of all, it is forwarded to the DNS servers of the ISP itself. Following this action, it is then re-directed to the proper web server and you get your website.
There are a ton of Domain name servers out there. Think of them as huge databases. Their sole role is to interpret what you typed using text and resolve it to an IP address. Why do you ask? Due to the simple fact. The servers don’t understand strings. Meaning, they talk in numbers, hence IP Addresses.
Nameservers
You probably encountered something of the following sort:
ns1.servername.com
ns2.servername.com
And this can go on. However, there are usually 2 – 3 for a service provider. In short, these are just the addresses of the domain name servers.
Now that I briefly covered some introductory information, I can move on to the juicy stuff, the type of records. Let’s begin with the most common one.
A Records
Its the simplest type of record. In short, it means, take this, point it from point A to point B. Let’s take a look at an example:
Imagine the following scenario. I bought a domain with company “A” and hosting with company “B”. My domain name is managed in company “A”. Company “A” is an entirely different entity than Company “B”. How does the “internet” know how to get to my website? ( “the internet” = the DNS servers).
In this case, I simply add an A record with Company A, pointing to our website which is physically hosted with company “B”. Or, we define Company “B’s” domain server names in Company “A”.
These are two different approaches. The first method is called adding an A record. The second one is called Setting up nameservers.
CNAME Record
This record is a bit trickier to understand. Let me quote wiki and explain:
A Canonical Name record (abbreviated as CNAME record) is a type of resource record in the Domain Name System (DNS) which maps one domain name (an alias) to another (the Canonical Name.)
CNAME records must always point to another domain name, never directly to an IP address.
Think of a CNAME record as an alias. To better grasp it lets take a look at the following instance for the sake of the example. My official name is “Mark”. It will always stay “Mark”.
However, that doesn’t mean my friends didn’t brand me with nicknames like all friends do within a group. Let’s say my nicknames (aliases) are: “the dude” and “monkey”.
If you shout: “Mark”, I will respond. Furthermore, if you shout the dude I will also respond, due to the fact its a nickname which is known to me. Same situation with “monkey”.
Do you get my drift? A CNAME is just another way to access something on your domain. That’s all. The next records i want to talk about are MX records.
MX Records
You should know this utilizes the same principal as an A record. We use MX records with mail servers. If you ever wondered how email servers know how to handle your incoming and outgoing emails and where to deliver them. Well, here’s your answer. MX Records allow such things. Finally, let’s move on to our final record for this tutorial, the TXT record.
TXT Records
This record is very technical in nature. In most cases, you won’t ever have to deal with them. However, they serve a very important role within the Domain name system. In short TXT records carry additional information. A simple example of a TXT record is its use with branded domains.