What Is DNS and How Does It Work?

By Jayden Andrews. April 30, 2020

The Domain Name System or the DNS is one of the foundations of the internet. Unfortunately, not many people realize its importance. They don’t even know that they use it every day to check their emails or to make online purchases.

But what does DNS mean? Well, DNS is a broad topic. But we’ll try to explain all the subtopics associated with it in this detailed post.

Top VPNs
Price from:
Price from:
Price from:

What Is DNS?

DNS is basically a directory of names that have corresponding sets of numbers. The numbers are what we call IP addresses, which devices connected to a network use to communicate with one another. Think of DNS like the contact list on your smartphone. Every contact has names, numbers, and email addresses.

Every device that connects to the internet is provided with a unique IP address, which is used by other machines to find the device. Because of a DNS server, the need to memorize IP addresses is eliminated.

How Does a DNS Work?

A DNS works by converting a hostname like www.DNS.com into a computer-friendly IP address such as An IP address is provided to each device on the internet and this address is essential to finding the appropriate device. Think of it as a street address that is used to locate a certain home.

When a user wants to access a web page, what he/she types into the web browser’s address bar is translated into a machine-friendly address.

To fully understand what DNS does, it is important to be familiar with the different hardware components involved in a DNS query, as well as other related terms.

What Are the Components Involved in a DNS Query?

  • DNS Recursor – Think of a recursor as a librarian who finds a specific book in a library. It is a server that is designed to receive different queries from machines through applications like web browsers. It is also responsible for creating requests that satisfy a client’s DNS query.
  • Root Name Server – The root server where the first translation happens. It translates a human-readable hostname into an IP address. It can be compared to a library index that shows the specific locations of books.
  • TLD Name Server – This is the top-level domain server. Think of it as a specific shelf of books in a library. This server is the next step in searching for an IP address. It hosts the last part of a hostname. For example, in the cause of www.dns.com, the TLD server is the com portion.
  • Authoritative Name Server – This is the final name server that DNS queries go through. It is similar to a dictionary on a shelf of books, in which a certain name can be further defined. This server is the last stop of a DNS query. If it has access to a requested record, it will provide the IP address for the requested hostname, which is sent back to the DNS Recursor.

What Is DNS Cache?

A DNS cache is also called a DNS resolver cache. It acts as a temporary database that is stored in a computer’s operating system. It contains all information about a user’s visits to websites, as well as other internet domains.

So, how does a DNS cache work?

Before your browser creates requests to the internet, your computer will intercept each one and look up the domain name in your local DNS cache database. This database hosts a list of all recently accessed domain names and addresses.

You can view the contents of your local DNS cache by using the command ipconfig /displaydns.

Private DNS and Dynamic DNS

A private DNS is more commonly known as DNS over TLS (Transport Layer Security) or DNS over HTTPS (Hypertext Transfer Protocol Secure).

When you use either one of the two, your DNS queries will be encrypted. In this setup, you are making it difficult for cybercriminals or malicious entities to eavesdrop on your internet traffic or activities.

What this means is that even if your daily work requires you to work for a software company in the United Kingdom, a private DNS will guarantee your safety against spies.

So, how do you use it?

Well, it depends on the platform that you will be using. Every operating system follows a specific set of steps for configuring a private DNS. To configure your device’s private DNS, you have to know how to configure a DNS address on your platform. And then, use a third-party DNS server that offers DNS over TLS or DNS over HTTPS.

Once your computer has been configured to use a private DNS, there will be no more network speed interruptions. You can start enjoying a private browsing experience.

Also called DDNS, Dynamic DNS is seen as a solution to the problem of ever-changing IP addresses. It associates your address with one consistent domain name without having to pay for an expensive static IP.

It is worth noting that having a residential IP address is not as simple as having a business IP address. The moment you sign up for the services of an ISP provider, you will be given an IP address. You will use this to access the internet from your home.

The problem is that this IP address may frequently change because your ISP manages the system. This makes it difficult for you to use a residential IP address with other devices like webcams and security cameras.

The good news is that a dynamic DNS can assign your home with a custom domain name. This will automatically update if your residential IP address continues to change.
To set up a dynamic IP address, all you need is a dynamic DNS host.

What Are DNS Records?

There are several types of DNS records you can modify at your domain server. These include the following:

  • A Record – A Record is the shorter term for Address Record. It is considered the purest form of DNS. This is what points a domain name to an IP address and allows users to easily type a recognizable domain name and be redirected to its corresponding IP address.
  • CNAME – Also called canonical name, CNAME redirects one domain to the other, allowing users to update one A Record at a time. For instance, the CNAME record allows dns.com to fetch the www.dns.com with the www in the beginning.
  • MX Entry – MX Entry or mail exchanger entry is a record that directs an email to a different server, even though it is a subdomain. It specifies how an email is routed when sent to an address that belongs to your domain.
  • TXT Record – This is often referred to as a “catch-all” record. However, it is not really intended to direct any traffic. Rather, it provides information to some external sources. It can be used to serve different purposes, depending on a user’s needs.
  • AAAA Record – Although it is somewhat similar to A Record, this allows you to point to a domain of an IPv6 address.

What Does Flush DNS Do?

When troubleshooting internet problems, a computer professional may usually suggest flushing a DNS cache. What happens during the process?

Flushing the DNS means removing all the entries, deleting any invalid DNS records, and forcing your device to repopulate the addresses the next time you visit those sites. The new addresses are usually retrieved from the DNS server that your network has been set to use.

So, for example, if you are having problems accessing www.dns.com, flushing the DNS may help you access the unproblematic www.dns.com.

To flush your local DNS, simply go to the Windows menu, type command prompt into the text field, hit Enter, and type the ipconfig /flushdns command into the command line. You will know that the command worked if you see a message that tells you Windows IP configuration successfully flushed the DNS Resolver Cache.

What Is Reverse DNS?

You already know what a DNS is and how it works. However, a nerd guy comes in and mentions reverse DNS. Now, what does that mean?

A reverse DNS is the exact opposite of a forward DNS, which maps a hostname to an IP address. In a reverse DNS, the IP address is mapped to a hostname. But why should you use it?

  • It adds a label for network troubleshooting tools.
  • It populates the received header field in SMTP emails.
  • It prevents commercial mails from being sent by residential or dial-up users.
  • It checks for generic reverse DNS to identify possible cybercriminals.
  • It verifies the relationship between the owner of a domain and the owner of a server.
  • It writes human-readable hostnames.
  • It determines which hostnames are affected when IP maintenance is performed.

When Is a Reverse DNS Useful?

There are many instances when a reverse DNS is useful. You can enable it if you want to prevent issues with your email. For example, if you are hosting a private email server, reverse DNS becomes useful for sending outgoing mails as it records the email’s origin, hence increasing the credibility of the email server.
It’s also handy if you are performing a cybercrime investigation. A reverse DNS records potential threats and mass senders throughout the internet. By checking both of the security API endpoints, you can easily identify the networks or users behind the mass attacks.

How to Know What DNS I Am Using?

Okay, you have already set up a DNS server on your device and you don’t have any clue what DNS you are using. Relax because there are many ways to check it.

For Windows

The Quick and Easy Way: Online

The quickest and easiest way to check what DNS you are using is to use an online site like Whats My DNS Server. Visit the website and click the button that says What’s My DNS Server? It will then show you your current DNS server.

It is worth noting, though, that this method is not free of errors. Even after you change your DNS, it may still pick up the old DNS from the cache. So, if you don’t trust this method, you can try another one.

Use Command Prompt

To check the DNS server that you are using, open Command Prompt. To do that, click on the Windows menu, select All Programs, click Accessories, and finally choose Command Prompt.
After that, run this command: ipconfig /all | findstr “DNS\ Servers”.
This command will then retrieve all network configuration values and filter out the information with DNS servers on it.

Use Another User-Friendly Command

This method is simpler and more user-friendly. All you have to do is perform an nslookup of a web address and Windows will inform you what DNS server you are using.

To perform an nslookup, open Command Prompt and enter this command: nslookup google.com. You can then replace google.com with the web address that you want. You can even change it to your own IP address.

In case you don’t know, nslookup is a command line utility that changes the DNS name to an IP address. In the process, it reveals the DNS server involved in the DNS query.

For Linux

If you are using a device that is running on Linux, just open the terminal and perform an nslookup for any website. The command should be the same with what you enter on Windows: nslookup google.com. You may replace google.com with your own IP address or another website of your choice.

For Mac

Similar to Linux, you need to open Terminal and input this command: nslookup google.com.To launch Terminal on macOS, press the CMD + Space keys together. This will launch Spotlight. Here, input terminal and hit Enter.
Alternatively, you may open Terminal via the Applications folder. From here, go to Utilities and double-click on Terminal. Once Terminal opens, enter the command above and hit Enter.

For Android

If you visit the Google Play Store, you will find a number of network scanner apps that allow you to see what DNS server you are using. Amongst all available apps, experts recommend Network Info II. Not only is it free to use, it is also lightweight and does not show any ads.

To use, make sure it is installed on your device. If not, download it from the Play Store. Once installed, navigate to the WiFi tab and check the entries under DNS 1 and DNS 2. The values in these entries are the DNS servers you are currently using.

Another app you can use is the PingTools Network Utilities. It is loved by many because of its many features and tools that allow you to perform various tasks, including a UPnP scan, LAN wakeup, and port scanning.

To use it to find out your DNS address, download it from Google Play and install it. After that, open the app and tap the Router icon. The app will now display all information about your network connection, including the DNS server you are using. Just like Network Info II, it will show your current DNS server under the DNS 1 and DNS 2 sections.

For iOS

If you are using an iOS device, you may download and install Network Analyzer to find out what DNS server you are using. It has two versions: a free one that is already enough to check what DNS server you are using, and a premium version that provides you with more information.
To use, download it from the App Store and install it. After that, open the app, go to DNS Server IP, and you will then see what DNS you are using.

For Routers

Your router will use the DNS server provided by your ISP by default. However, if you suspect that somebody has changed it, you can always check it.
Here’s how:
1. Open up your choice of web browser.
2. Input your router’s IP address, which is usually
3. Log in with your administrator username and password.
4. Once you access the router’s interface, navigate to Network Setup and go the DNS1 and DNS 2 sections. Here, you should find what DNS you are using.
5. If you find any suspicious or third-party DNS IP, google it or perform a quick nslookup. If you do not know about the DNS service, might as well change the DNS on your PC to override the setting on your router.

Do you like this post? 1 Star2 Stars3 Stars4 Stars5 Stars