What is a DNS server? In short, DNS is a system that converts website URLs into IP addresses. Without DNS, you have to type the complete IP address when you want to visit a website.

If you are curious about a more complete explanation, don't leave this article. Because here, we will explain the complete understanding of DNS and its functions, the parts of DNS, and how DNS works.

What is DNS?

Domain Name Server or DNS is a system that connects Uniform Resource Locator (URL) and Internet Protocol Address (IP Address).

Normally, to access the internet, you need to type in the IP address of a website. This method is quite troublesome. Because, this means, you need to have a complete list of IP addresses of websites visited and enter them manually.

DNS is a system that summarizes this job for you. Now, all you have to do is remember the domain name and enter it in the address bar. DNS will then translate the domain into an IP address that the computer understands.

Suppose, you want to access Google. Instead of writing into the address bar, you can simply enter the Google.com address.

DNS Benefits

From the explanation of what DNS is, you should be able to guess how DNS actually functions. However, for clarity, here we describe three DNS functions:

  • Requesting IP address information for a website based on a domain name;
  • Request URL information for a website based on the IP address entered;
  • Find the right server for sending email.

Those are the three DNS functions that work automatically when you are accessing the internet.

So, before getting into the explanation of how DNS works, you will ask why you should use DNS?

The following are some of the benefits of using DNS in internet activities:

  • It's easier to go internet. Compared to remembering a row of IP address numbers, of course it will be more comfortable to remember the name of the website. DNS has succeeded in bridging communication between internet users and computers.
  • More Consistent in Use. You can use the same DNS name even if there are changes to the IP address used. Thus, visitor access to one website can still be done even though there has been a change in IP Address.
  • Easier to Configure. When there are problems with the IP address used, you can easily replace it with a different IP. It is enough to update the DNS and IP Address matching data. This will be explained further in How DNS Works.
  • Safer. When using a DNS system, all online data transfer activity goes through gated DNS servers. The system will prevent hacking attempts by irresponsible parties. So, the website will be safer.

Now that we know its advantages, let's learn more about the part of DNS.

DNS Parts

The basic principle of how DNS works is to match the name of the URL component with the IP Address component. Each URL and IP Address has parts that explain each other.

If you have a hard time getting the technicalities out of it, think of it like a library search. When you look for a book in the library, you will usually be given a code that describes where the book is located.

The library book code is called the Dewey Decimal System (DDS). Usually it consists of the book's topic code, the author's last name code, and the code for the year the book was published.

Approximately the same principles apply in DNS. To understand it more deeply, you need to know the parts of the URL that are organized in the DNS hierarchy. Just like library book code, each section describes a part of the domain.

One noticeable difference is that the library code starts from the front. On the other hand, codes that apply to DNS are sorted from the back. Therefore, we're going to trace these parts of DNS from behind. Here's the full explanation:

DNS Scheme

  • The Root-Level Domain is the highest part of the DNS hierarchy. Usually it is a period (.) At the very back of a URL.
  • Top-Level Domains are extensions that sit on the front of the root-level domain. There are two types of TLDs that are commonly used. Both are Generic Top-Level Domain (GTLD) and Country Code Top-Level Domain (CCLTD).

The GTLD usually describes the institutional nature of the web owner. Say, a website for commercial purposes usually has a .COM extension. Then, .EDU for educational institutions and .GOV for government agencies.

On the other hand, CCLTD is an extension that defines the country of origin of the site owner. For example, the suffix .ID for the Indonesian website, .AU for Australia, .UK for the UK, and so on.

  • Second-Level Domain is another name for the domain itself. It is often used as an institutional identity or branding. In the case of the en.wikipedia.org URL, what SLD means is wikipedia.
  • Third-Level Domain or subdomain is part of the main domain that stands alone. If the domain is like a house, a subdomain is a special room in the house itself.
  • Hostname or it can be called a scheme. This is the part that starts a URL. This section shows a function of a website or page. The most widely used examples are HTTPS or Hypertext Transfer Protocol Secure.

How DNS Works

DNS works in stages. Starts the process of requesting information or a DNS query. Then proceed with other steps such as DNS recursion, root nameservers, TLD nameservers, to authoritative nameservers.

Without further ado, here is an explanation of how DNS works. Everything is sorted step by step.

DNS Query

DNS Query is a technical term for requesting information about an IP address. This stage starts when you type the URL into the address bar.

The DNS server then looks for information on filehosts. If the information you are looking for is not found, the server will try to find pieces of information or record information that has been recorded in the system (cache).

In this initial stage itself, there are three types of DNS Queries. The three are recursive queries, iterative queries, and non-recursive queries. Below, you can find the meaning:

Recursive query

The user provides a hostname to which the DNS Resolver should answer. There are two possible answers. First, DNS will provide relevant information after searching the Root Server or Authoritative Name Server. Second, the browser will display an error message because the information cannot be found.

Iterative query

The user enters the hostname. The DNS resolver will look for the relevant cache in memory. If this is not successful, the DNS resolver will look for information on the Root Server and Authoritative Name Server that is closest and relevant to the DNS zone.

Non-recursive query

This is the fastest information retrieval process. This type does not require a Root Server or Authoritative Name Server search because the data sought is cached.

DNS Recursor / DNS Recursive Resolver

DNS recursor is the first stage of information retrieval. When a user enters a URL and does not find valid results in the cache, the system will look for information in the cache of the internet service provider (ISP).

Root Name Server

Let's say the information you are looking for cannot be found at the ISP. Then, the system will look for the information you need to the root name server.

The root name server is a kind of database that answers questions about domain names and IP addresses. This server does not have the exact answer for the information it is looking for.

However, this server can forward requests for information to those who know better. In this world, there are 13 working root servers. The root servers are sorted alphabetically from A to M.

These root servers are managed by organizations such as the Internet Systems Consortium, Verisign, ICANN, the University of Maryland, and the U.S. Army Research Lab.

TLD Name Server

From the root name server, the system will read the type of information it is looking for from the top-level domain. Each TLD such as .COM, .ORG, .EDU, .ID, .AU, and so on has a specific server.

By reading this information, the system can continue searching for information to the server that actually owns the data being sought.

Authoritative Name Server

After finding instructions on where the desired server is, we come to the authoritative name server. This type of server has all complete information about the destination website.

When the requested information matches the results, the browser will display the website or page that you requested at the beginning. Of course these search results have a certain time period.

This search process will be repeated to ensure the information displayed is up-to-date. However, of course, some of this information is cached on the device just in case the query process runs fast.

Types of DNS

The information that a user requests in a DNS system is called a DNS record. There are several types of information that can be requested in the DNS system. Here are the 10 most common DNS records:

  • A Record or Address record ─ stores information about the hostname, time to live (TTL), and IPv4 address.
  • AAA Record ─ stores hostname information and its associated IPv6 address.
  • MX Record ─ records an SMTP server specifically used for exchanging e-mails in a domain.
  • CNAME Record ─ is used to redirect a domain or subdomain to an IP Address. Through this one function, you don't need to update your DNS records.
  • NS Record ─ refers to the subdomain on the desired authoritative name server. This record is useful if your subdomain on your web hosting is different from your domain.
  • PTR Record ─ gives permission to the DNS resolver to provide information about the IP address and display the hostname (reverse DNS lookup).
  • CERT Record ─ stores the encryption certificate or security certificate.
  • SRV Record ─ stores information related to communication locations, such as Priority, Name, Weight, Port, Points, and TTL
  • TXT Record ─ carries and transmits data that can only be read by machines.
  • SOA Record ─ the section that appears at the beginning of the DNS zone document. The same section also refers to the Authoritative Name Server as well as complete information on a domain.

Domain name registration

The right to use a domain name is delegated by domain name registrars which are accredited by the Internet Corporation for Assigned Names and Numbers (ICANN) or other organizations such as OpenNIC, that are charged with overseeing the name and number systems of the Internet. In addition to ICANN, each top-level domain (TLD) is maintained and serviced technically by an administrative organization, operating a registry. A registry is responsible for operating the database of names within its authoritative zone, although the term is most often used for TLDs. A registrant is a person or organization who asked for domain registration. The registry receives registration information from each domain name registrar, which is authorized (accredited) to assign names in the corresponding zone and publishes the information using the WHOIS protocol. As of 2015, usage of RDAP is being considered.

ICANN publishes the complete list of TLDs, TLD registries, and domain name registrars. Registrant information associated with domain names is maintained in an online database accessible with the WHOIS service. For most of the more than 290 country code top-level domains (ccTLDs), the domain registries maintain the WHOIS (Registrant, name servers, expiration dates, etc.) information. For instance, DENIC, Germany NIC, holds the DE domain data. From about 2001, most Generic top-level domain (gTLD) registries have adopted this so-called thick registry approach, i.e. keeping the WHOIS data in central registries instead of registrar databases.

For top-level domains on COM and NET, a thin registry model is used. The domain registry (e.g., GoDaddy, BigRock and PDR, VeriSign, etc., etc.) holds basic WHOIS data (i.e., registrar and name servers, etc.). Organizations, or registrants using ORG on the other hand, are on the Public Interest Registry exclusively.

Some domain name registries, often called network information centers (NIC), also function as registrars to end-users, in addition to providing access to the WHOIS datasets. The top-level domain registries, such as for the domains COM, NET, and ORG use a registry-registrar model consisting of many domain name registrars. In this method of management, the registry only manages the domain name database and the relationship with the registrars. The registrants (users of a domain name) are customers of the registrar, in some cases through additional subcontracting of resellers.