What Is DNS and What Is It Used For?

Every website has an IP address. However, people cannot remember the IP address of every website on the Internet. That’s where DNS comes into play. DNS replaces the IP address of a website with a meaningful domain name. Let’s deep dive and learn what is DNS all about. All website owners should have this understanding.

What Is DNS?

DNS is sometimes referred to as the Internet’s Yellow Pages. When you needed to find a business address in the past, you looked it up in the Yellow Pages. DNS is similar; however, you don’t have to look anything up because your computer is linked to the Internet. It’s how your computer figures out where Google.com is.

How Does DNS Work?

Now you know what is DNS all about. It’s critical to understand how DNS works because it’s such a crucial aspect of the Internet.
Consider DNS to be a phone book; only instead of mapping people’s names to street addresses, it maps computer names to IP addresses. A “DNS record” is the name given to each mapping. To get these records, DNS clients on linked devices contact DNS servers. Different sorts of records are used for various purposes. Web browsers use an “A” type record, but a “MX” record links to a mail server. This is how you may host a website with one provider and use an email service with another.

Types of DNS Server

As of now, you know what is the use of DNS. Along with that, let’s explore the different DNS server types that you can find out there.

1- DNS Recursor

A DNS recursor, also known as a recursive resolver, takes requests from DNS clients, answers if a hit is available in cache or contacts a nameserver further up the chain. Internet Service Providers frequently execute recursors, but it’s simple to modify a computer’s DNS setup to link to a different source for performance, security, or privacy reasons.

2- Root Nameserver

As the name indicates, Root servers are the basis upon which the whole DNS system is built. For top-level domains (TLDs) such as “.com” and “.net,” root servers operate as authoritative name servers. However, there is a difficulty because hostnames inside those same TLDs refer to the root servers.

3- TLD Nameserver

TLD Name Servers are only second to root servers in terms of relevance, as they know where to go for answers regarding each domain inside a specific TLD. When you type www.Google.com into your browser, a TLD server for the ‘.com’ component of the domain name will answer first, directing the client to the nameserver that has the records for the Google.’ portion of the domain name.

4- Authoritative Nameserver

A DNS query’s ultimate stop is the authoritative name server. This server, or several servers for redundancy’s sake, is the domain’s highest authority. However, not all DNS searches make it to the authoritative nameserver, as cached answers may exist closer to the originating request. Based on this, you can understand what does DNS do.

Types of DNS Records

When you want to learn what is DNS all about, you will come across a few different DNS records. Here are the most common DNS records that you will find.

“A” Record

This DNS record represents the classic use of DNS. It is translating the domain of a website into its resembling IPV4 address.

“AAAA” Record

The AAAA record does the same work as the A record. However, it is translating the domain into IPV6 address.

“MX” Record

MX is the short word given for Mail Exchange. This record identifies an email server linked with the domain.

“TXT” Record

TXT Record is versatile as you can use it for multiple purposes. For example, you can use this record to prove domain ownership or sign emails cryptographically to fight against spam.

“”CNAME”” Record

CNAME is the abbreviation for Canonical Name. This would point a domain name to a different domain name. In other words, a domain name replaces the IP address here.

“”SRV”” Record

SRV record holds information about the IP address as well as the specific port associated with the service.

Steps in a DNS Lookup

  • When a user inputs ‘example.com’ into a web browser, the query is transmitted across the Internet and received by a DNS recursive resolver.
  • A DNS root nameserver is then queried by the resolver (.).
  • The root server then sends the resolver the address of a Top-Level Domain (TLD) DNS server (such as.com or.net), which contains the information for the resolver’s domains. When we search for example.com, we are directed to the.com top-level domain.
  • After that, the resolver sends a request to the.com TLD.
  • The IP address of the domain’s nameserver, example.com, is then returned by the TLD server.
  • Finally, the recursive resolver contacts the domain’s nameserver with a query.
  • The nameserver then returns the IP address, for example.com to the resolver.
  • After that, DNS resolver responds to the web browser with the IP address of the domain that was originally requested.

Types of DNS Queries

1- Recursive Query

DNS Servers with recursion feature enabled answers to recursive queries with either the record data of the question or an error message if they could not locate the record. Disabling this feature (which is actually a good security practice for local servers) will result in rejected unrelated queries.

2- Iterative Query

In this case, the DNS client will let the DNS server deliver the best possible result. If the queried DNS server cannot locate the record in local DNS Zones or DNS cache, it will forward the request to upper-level DNS Servers. After then, the DNS client will query the referral address. This operation continues along the query chain with other DNS servers until an error or timeout occurs.

3- Non-recursive Query

When a DNS resolver client asks a DNS server for a record that it has access to, either because it is authoritative or in its cache, DNS records are typically cached by DNS servers to save unnecessary bandwidth usage and pressure on upstream systems.


By now, you have a complete understanding of what DNS is all about. Use this understanding when you work with a DNS server. Then you can figure out what you are doing. If you still need more details check this post!

Leave a Comment