The Internet plays a major role in our life. And, the Domain Name System (DNS) and Internet Protocol Address (IP) are the most important parts of the Internet.
When you register a domain name, for example, to refer it to a website or to use email, you use DNS: The Domain Name System. This system is one of the most important building blocks of the modern Internet. Without DNS, the use of a domain would not be possible.If you are familiar with the Internet and websites, you probably already have a good idea of what DNS entails, translating a domain name to an IP address.
However, experience shows that this complex and abstract system can be a source of confusion and challenges for advanced users.
Here, we take a look at the structure and functioning of DNS and how it is connected to your domain name, website, and email. The aim is not so much deepening, but explaining the connections and coherence of DNS. After all, it is a crucial part of the Internet.
These are questions we often see on people asks.
- What exactly is DNS?
- How does DNS work?
- How can I change my DNS records?
End users come into contact with DNS when they want to make advanced changes to the way a domain name works. For example, they want to use a subdomain for their home server or use an external Exchange environment, such as Office 365 or G Suite.
In such a situation, substantive instructions are often given from the supplier or a manual; “Change your DNS records as follows.” However, simple instructions for setting the supplied values are not the same as a substantive explanation. People do have the raw data they have to set, but they usually don’t know why or how it works.
A common basic definition of DNS is as follows:
The Domain Name System (DNS) is the system and network protocol used on the Internet to translate computer names to numerical addresses ( IP addresses ) and vice versa.
Correct, but this can be expressed more simply. DNS is the system that ensures that your computer knows which server on the Internet to send a request to when you use a domain name to find a website.
As the definition also calls, this is based on an IP address. DNS helps you (computer) to find the correct IP address with a domain name. The resulting IP address is then used by network protocols to send a request over the Internet via the correct route.
The phone book
To make the principle of DNS more tangible, the system is often compared to an address or telephone book. In many cases, this is the easiest equation to understand the function and operation of DNS, without requiring knowledge of technical terms and principles.
The simplest comparison is a phone book. You open the telephone book and look up your name.
That explanation is usually sufficient. However, in many cases, DNS is more complex than that. One way to follow that complexity is to provide different technical definitions. But what I prefer to do in this article is to expand the simple equation.
Multiple phone numbers
Just as a person or company can have different phone numbers, a domain name can also use different IP addresses. For example, it is possible that xyz.com can be accessed via multiple IPs.
Also, different parts of a domain name can also have separate targets and, therefore, separate IP addresses. For example, one mail server ( xyz.com) also uses the xyz.com domain but refers to a different IP address: 184.108.40.206. So you quickly get a collection of names for xyz.com in the ‘Address Book,’ in the DNS:
- www. xyz.com 220.127.116.11
- mail. xyz.com 18.104.22.168
- my. xyz.com 22.214.171.124
Such a collection of names under the same domain is also called a ‘DNS zone.’ A DNS zone can be compared to a single entry of, for example, a company in the telephone directory that can contain one or more numbers (DNS records). Besides, a DNS record can refer to another name (hostname) instead of an IP address.
Thus, the DNS zones for a domain contains DNS records that can point to an IP address or other name. So far, so good! However, we are not there yet. This is just the tip of the DNS iceberg. The DNS records that are in a zone also have different flavors.
DNS records and record types:
How does the email server know when you send someone an email, which IP address from the DNS zones should be used? That is a simple example, and the answer can be found in the different types of DNS records. To maintain the comparison with a more tangible example; When you look up the phone number of a company, multiple numbers may be given.
DNS uses a similar system to distinguish different DNS records and their purpose. As you can see in the example ‘Administration,’ you can find a DNS record with the ‘type’ MX (Mail eXchange) in DNS zones. This indicates that the ‘target’ mentioned in that DNS record should be used for delivering emails. If your mail server wants to send an email to, for example, [email protected], it will check the DNS for the MX record for xyz.com:
- xyz.com. MX 1 ASPMX.L.GOOGLE.COM.
- xyz.com. MX 10 ASPMX2.GOOGLEMAIL.COM.
- xyz.com. MX 5 ALT1.ASPMX.L.GOOGLE.COM.
- xyz.com. MX 10 ASPMX3.GOOGLEMAIL.COM.
- xyz.com. MX 5 ALT2.ASPMX.L.GOOGLE.COM.
Why is this useful to know? Suppose you have a domain name, and you want to have the email for this domain taken care of by external email services, such as G Suite or Office 365. You then know that you must at least adjust the MX record for your domain to ensure that messages are handled in the right place. Do you notice that your email is not arriving correctly? Then check whether the MX record is set correctly.
As the MX record is a type of DNS record, there are other common variants that you will encounter if you manage or change DNS.
NS stands for the name server and allows you to use separate name servers for subdomains than the name servers of your root domain name.
Where do I add an NS record?
You can easily add DNS records via your domain control panel provided by your domain registrar, free of charge. Here look for the ‘ Domain’ section and click on the domain for which you want to set the NS record. It is recommended to look for steps given by your registrar, as every registrar might have different options set on different places.
The NS record or ‘Name Server record’ is used to indicate which name servers are ‘Authoritative’ for the domain name. In other words, these records state which name servers are ‘in charge’ of the contents of the DNS zone for a domain. This is important because DNS is a distributed system.
How do I set an NS record?
As mentioned, you use an NS record to provide a domain with different name servers than the name servers you use for your root domain.
In the example above, we use our name servers for our subdomain ‘ forum.site-example.com.
An A record, also known as an ‘Address record,’ is the most common and simplest type of DNS record. Often used as a textbook example of DNS. An A record converts a domain name into an IP address and takes the form:
- ABC.com. A 126.96.36.199
An AAAA record is the younger brother of the A record. This record type performs the same function, but for IPv6 addresses instead of IPv4 addresses. For example, an AAAA record takes the form:
- ABC.com. AAAA 2a03:3c00:a001:7005::1
A CNAME record or ‘Canonical Name record’ indicates that a name is an alias for another name. If someone requests the address for which the CNAME is set in the DNS, they will receive the target name in response. A second DNS request is then required to trace it back to an IP. An interesting restriction is that a CNAME record can only be set for a subdomain. This is possible for www.ABC.com, but not for xyz.com. An example:
- www.ABC.com. CNAME ABC.com.
A TXT record, or a ‘Text record,’ is used to include text in a DNS zone. This record type can be used, for example, for verification purposes, such as to demonstrate domain ownership upon registration. Also, the TXT record is used for ‘unofficial’ DNS records, such as an SPF record, which does not have its DNS record type. For example, a TXT record (with SPF data) is:
- ABC.com. TXT “v=spf1 a mx a:mail.ABC.com
- a:mijn.ABC.com a:support.ABC.com
- include:cmail1.com include:_spf.google.com
- include:amazonses.com ip4:188.8.131.52 ip4:184.108.40.206 ip4:220.127.116.11
- include:utility.openprovider.com ?all”
How to find DNS records set for specific domain.
DNS records for any specific domain can be retried by performing DNS lookup. You can find an online DNS Lookup tool under “IP TOOLS” menu. It will show you the detailed information of all the DNS records for entered domain name.