Everything you need to know about network DNS servers. A DNS or a domain name system is used to translate domain names into IP addresses, allowing the browsers to access other internet resources.
A DNS server is a computer server that contains a database of public IP addresses and their associated hostnames, and in most cases serves to resolve, or translate, those names to IP addresses as requested. DNS servers run special software and communicate with each other using special protocols.
You may see a DNS server referred to by other names, such as a name server or nameserver, and a domain name system server.
The Purpose of DNS Servers
The DNS server sits in the space between humans and computers to help facilitate their communication.
It’s easier to remember a domain or hostname like lifewire.com than it is to remember the site’s IP address numbers 188.8.131.52. So when you access a website, like Lifewire, all you have to type is the URL https://www.simmyideas.com.
However, computers and network devices don’t work well with domain names when trying to locate each other on the internet. It’s far more efficient and precise to use an IP address, which is the numerical representation of what server in the network (internet) the website resides on.
What DNS Servers Are Involved in Loading a Website?
If your computer can’t find a matching IP address in your hosts file or cache, it will submit your DNS query or request to a network of four DNS servers. The following section will cover each DNS server and how they work.
The DNS resolver or recursive resolver acts as the primary intermediary between a computer and other DNS servers. Its purpose is to forward a request to other domain name system servers and then send it back once fulfilled.
When the DNS resolver receives a request, it will first search its cache to find a matching IP address for the domain name. If said IP address found, the request sent to the DNS servers ends here, and you will immediately see the site you want to visit.
However, if no match is found in its cache, the DNS resolver will send the request to the next DNS server – the root nameserver.
The root nameserver or root DNS server is at the top of the DNS hierarchy. Think of it as a bank of reference.
It doesn’t keep the information you’re looking for, which is the IP address to match the domain name – but it gives directions to where it can be found.
Once the root nameserver receives a request from the recursive DNS resolver, it will identify the top-level domain of the domain name. Then, it will tell the recursive resolver to go to the correct TLD nameserver.
The TLD nameserver is a DNS server function that is responsible for storing and managing information about domain names that use a specific top-level domain (TLD). A TLD is the far end of a domain name, such as .com, .org, .online, and .net.
If your query is to find the IP address of hostinger.com, the root nameserver will redirect the DNS recursive resolver to the .com TLD nameserver. Next, the TLD nameserver will inform the resolver about the location of the matching IP address at a specific authoritative nameserver.
The authoritative nameserver or authoritative DNS server is the final authority in the DNS resolution process. It stores all information related to the domain name you want to visit, including its IP address. The recursive resolver will obtain the IP address and send it back to your computer, directing you to the site.
Finally, the domain name system resolver performs DNS caching, storing IP addresses collected from authoritative nameservers as temporary data. In other words, DNS caching makes it so that the next time you want to visit the same site, it will simply send back the IP address match obtained before.
What Are Domain Nameservers?
A domain nameserver’s job is to store all types of DNS records of a domain name. Whenever someone sends a query about your domain name, the nameserver will send back the necessary information of your domain name, allowing them to find your website.
A nameserver address looks similar to a domain name. Hosting providers usually have two or more nameserver addresses. For example, here are Hostinger’s DNS nameservers:
In practice, nameserver addresses are often used to point a domain name to a hosting account via the DNS services.
If you purchased a domain name from a hosting provider, this action is not needed. However, it must be done if the domain registrar isn’t the same as your hosting provider’s.
For example, if you host a website at any hosting provider but purchased a domain from Google Domains, you’ll have to change the domain’s nameservers to point it to the hosting provider. Only then will the domain name be connected to the website.
How DNS Servers Resolve a DNS Query
When you enter a website address into your browser’s address bar, a DNS server goes to work to find the address that you want to visit. It does this by sending a DNS query to several servers, each of which translates a different part of the domain name you entered. The different servers queried are:
- A DNS Resolver: Receives the request to resolve the domain name with the IP address. This server does the grunt work in figuring out where the site you want to go actually resides on the internet.
- A Root Server: The root server receives the first request, and returns a result to let the DNS resolver know what the address of the Top Level Domain (TLD) server that stores the information about the site. A top level domain is the equivalent of the .com or .net portion of the domain name you entered into the address bar.
- A TLD Server: The DNS resolver then queries this server, which will return the Authoritative Name Server where the site is actually returned.
- An Authoritative Name Server: Finally, the DNS resolver queries this server to learn the actual IP address of the website you’re trying to deliver.
Once the IP address is returned, the website you wanted to visit is then displayed in your web browser.
It sounds like a lot of back and forth, and it is, but it all happens very quickly with little delay in returning the site you want to visit.
The process described above happens the first time you visit a site. If you visit the same site again, before the cache on your web browser is cleared, there’s no need to go through all these steps. Instead, the web browser will pull the information from the cache to serve the website to your browser ever faster.
Primary and Secondary DNS Servers
In most cases, a primary and a secondary DNS server are configured on your router or computer when you connect to your internet service provider. There are two DNS servers in case one of them happens to fail, in which case the second is used to resolve hostnames you enter.
Several publicly accessible DNS servers are available for you to use. If you want to change the DNS servers your network connects to, see our Free & Public DNS Servers List for an up-to-date listing.
Why You Might Change Your DNS Server Settings
Some DNS servers can provide faster access times than others. This is often a function of how close you are to those servers. If your ISP’s DNS servers are closer to you than Google’s, for example, you may find domain names are resolved quicker using the default servers from your ISP than with an external server.
If you experience connection problems where it seems no websites will load, it’s possible there’s an error with the DNS server. If the server isn’t able to find the correct IP address that’s associated with the hostname you enter, the website can’t be located and loaded.
Some people choose to change their DNS servers to ones provided by a company they consider more trustworthy; e.g., one that promises not to track or record the websites you visit.
A computer or device, including smartphones and tablets, connected to your router can use a different set of DNS servers to resolve internet addresses. These will supersede those configured on your router and will be used instead.
How to Obtain Internet Server Information
The nslookup command is used to query your DNS server on Windows PCs.
Start by opening Command Prompt, and then typing the following:
This command should return something like this:
In the example above, the nslookup command tells you the IP address, or several IP addresses in this case, that the lifewire.com address translates to.
DNS Root Servers
There are 13 important DNS root servers on the internet that store a complete database of domain names and their associated public IP addresses. These top-tier DNS servers are named A through M for the first 13 letters of the alphabet. Ten of these servers are in the US, one in London, one in Stockholm, and one in Japan.
The Internet Assigned Numbers Authority (IANA) keeps this list of DNS root servers if you’re interested.
Malware Attacks That Change DNS Server Settings
Malware attacks against DNS servers are not at all uncommon. Always run an antivirus program because malware can attack your computer in a way that changes the DNS server settings.
For example, if your computer uses Google’s DNS servers (184.108.40.206 and 220.127.116.11) and you open your bank’s website, you naturally expect that when you enter its familiar URL, you’ll be sent to the bank’s website.
However, if malware changes your DNS server settings, which can happen without your knowledge after an attack on your system, your system no longer contacts Google’s DNS servers but instead a hacker’s server that poses as your bank’s website. This fake bank site might look exactly like the real one, but rather than logging you into your bank account, it harvests the username and password you just typed, giving the hackers the essential information they need to get into your bank account.
Malware attacks that hijack your DNS server settings may also redirect traffic away from popular websites to ones that are full of advertisements or to a fake site designed to scare you into believing your computer has been infected with a virus, and that you must buy their advertised software program to remove it.
Don’t fall for websites that suddenly pop up with flashing warnings telling you your computer has been infected with a virus, and that you must purchase some software to get rid of it. They’re always scams.
Protecting Yourself From DNS Attacks
There are two things you should do to avoid becoming a victim of a DNS settings attack. The first is to install antivirus software so that malicious programs are caught before they can do any damage.
The second is to pay close attention to the appearance of important websites you visit regularly. If you visit one and the site looks off in some way—maybe the images are all different or the site’s colors have changed, or menus don’t look right, or you find misspellings (hackers can be dreadful spellers)—or you get an “invalid certificate” message in your browser, it might be a sign that you’re on a faked website.
How DNS Redirection Can Be Positively Used
This ability to redirect traffic can be used for positive purposes. For example, OpenDNS can redirect traffic to adult websites, gambling websites, social media websites, or other sites network administrators or organizations don’t want their users visiting. Instead, they may be sent to a page with a “Blocked” message.
Importance Of DNS Servers
1. Add network wide parental controls- DNS servers give you the added advantage of being able to block access to certain sites from the devices in your home or work network. There are even a number of public DNS servers (like OpenDNS) that can help you leverage on this nifty feature.
2. Avoid censorship – Are you in an area where there is censorship to certain sites? Then DNS servers can prove to be quite helpful to you. Net censorship is usually carried out by blocking access to particular sites through your ISP’s DNS. Therefore, a great way to bypass this is by changing the DNS servers that your computer uses.
3. By pass content restrictions for geographical areas – Certain sites have content restrictions that only allow people within certain regions or countries to be able to gain access to them. DNS servers can help you bypass these restrictions. Some DNS servers do this by replacing your IP address with one of theirs thereby tricking the website into thinking that you are in a region where access to that content is allowed.
4. Increase internet security – Internet security has become a nightmare nowadays. This is especially true for organizations (they are the biggest targets for hacking). Many organizations usually handle sensitive data for their clients hence the need for proper security controls in protecting them. One of such controls is the use of DNS servers. By ensuring that all queries go through a specific DNS server, companies are at a better position of protecting themselves against any external attacks.
Note: It’s important that you also invest in other security measures to protect your data. Usage of DNS Servers alone does not guarantee that your data will not be hacked.
5. Faster web browsing – If you are experiencing slow internet speeds, then it’s important that you consider changing your DNS servers. Many people usually jump to changing their ISPs, which may be costly and might only serve to solve the problem halfway. There are many instances where changing the DNS servers has led to considerable speed changes. There are also tools that can help you check whether your current DNS server is up to speed and give you recommendations of DNS servers that you can make use of.
Do you need more information about DNS servers, you can also check out what the folks at Dyn have to say about it.
How do I find the best DNS server for my area?
To test different DNS servers, use a benchmarking tool like GRC DNS Benchmark for Windows and Linux or Namebench for Mac. In some situations, you can significantly increase your internet speed by switching DNS servers.
How do I fix the ‘DNS Server Not Responding’ error?
If you see the DNS Server Not Responding error, clear the DNS cache and run Windows Network Troubleshooter. If you recently installed antivirus software, temporarily disable it to see if that helps. If that doesn’t solve the problem, try switching DNS servers.
How do I clear the DNS cache on Windows?
Open Command Prompt and enter ipconfig /flushdns to clear the DNS cache. You can clear the cache in Microsoft PowerShell with the Clear-DnsClientCache command.
Why are there only 13 DNS root name servers?
DNS uses 13 root name servers due to the limitations of Internet Protocol version 4 (IPv4). The number 13 was chosen as a compromise between network reliability and performance.