What is a DNS server? [+ what to do when it isn’t responding]

Written by: Clinton Joy
Smiling man in a bright blue jacket and red beanie gestures with one hand towards a pink and white circular graphic set against a warm yellow background.

HUBSPOT CMS WITH FREE WEB HOSTING

Learn More About HubSpot's CMS with Free Web Hosting

Get HubSpot's CMS Software
woman looking up what is a dns server

Updated:

One of the first things I did when I first became interested in coding and website development was learn about the internet and how it works. I was fascinated by the idea that behind every website I visited were servers, protocols, and systems working quietly in the background.

Learn More About HubSpot's CMS with Free Web Hosting

Domain name system (DNS) servers were one of the things I learned about. Over time, my understanding of DNS servers and their operations proved to be beneficial to my work.

So, what exactly is a DNS server, why does it matter, and what should you do when it stops responding? That’s exactly what I’ll cover in this post, along with the best DNS server options I recommend and how to check which one you’re using right now.

Table of Contents

What is a DNS server?

DNS stands for domain name system. This domain name system is responsible for translating human-friendly website names into machine-friendly IPs. And DNS servers work together in a distributed system to store and retrieve the IP addresses of domains.

Think of a DNS server as a phonebook, just like the one you have in your mobile device. You obviously do not know all the phone numbers in your phonebook by heart, right? Maybe you can remember a few important numbers, like your family’s, but definitely not all your contacts. But then, on the other hand, you can remember the names of the people in your contacts; maybe you even saved their contact information with a nickname.

That’s kind of how a DNS server works. Instead of remembering long strings of website IP addresses (like 142.250.185.206 for Google), all I need to remember is google.com, and the DNS server does the work of linking Google to that IP address, therefore making my search successful.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure

Main Types of DNS Servers

There are four main types of DNS servers:

  • Recursive DNS Server (Resolver)
  • Root DNS Servers
  • TLD (Top-Level Domain) DNS Servers
  • Authoritative DNS Servers

The authoritative DNS servers are the final sources of truth for a domain. They store the actual DNS records (A, MX, CNAME, etc.) for that domain.

Example: For google.com, Google’s authoritative DNS server gives back the real IP address. Think of them as the official record keepers for each website.

Within authoritative servers, we have the primary and secondary. The primary DNS server is the master copy of DNS records (zone file). Updates happen here. The secondary DNS server is a read-only backup copy of the primary, used for redundancy.

Using Google as an example, here’s how the main types of DNS servers work together.

  1. Your browser asks the recursive DNS server (ISP/Google/Cloudflare).
  2. Recursive server asks a root server: “Who handles .com domains?”
  3. Root server points to .com TLD server.
  4. TLD server points to Google’s authoritative DNS server.
  5. The authoritative server replies: “google.com = 142.250.185.206.”
  6. Recursive server gives answers back to your browser.
  7. Browser connects you to Google.

What is a primary DNS server?

A primary DNS server is the main, original source of DNS records for a domain. When your browser asks, “Where can I find this website?” The primary DNS server is the first responder. It holds a zone file that contains the DNS records for that domain:

  • The IP address of the server.
  • Admin contact information.
  • TTL (Time to Live), which defines how long that DNS record should stay cached.

If the primary server is down, whether from a hardware failure, cyberattack, or even something as simple as a power outage, the request is handed over to a secondary DNS server. This redundancy is why most registrars today require secondary servers. In my own deployments, I never skip setting up backups.

Here is a table that simplifies the difference between a primary DNS server and a secondary DNS server.

Feature

Primary DNS Server

Secondary DNS Server

Role

Holds the original, authoritative DNS records for a domain.

Stores a read-only copy of the primary server’s records.

Zone File

Contains the master zone file (can be edited/updated).

Contains a replica zone file (cannot be edited, only synced).

Updates

Admins make direct changes to DNS records here.

Updates are received via zone transfers from the primary server.

Authority

Acts as the authoritative source for DNS records.

Relies on the primary for authoritative data.

Requirement

Required for a DNS system to function.

Optional, but recommended (sometimes required by registrars).

Performance Impact

Handles the initial DNS queries directly.

Helps distribute DNS query load and improve reliability.

What is the purpose of a DNS server?

Let’s say I type facebook.com in my browser and hit search. My device asks the DNS server, “Hey, what’s the IP for facebook.com?” Then, the DNS server checks if it already knows the answer (cached). If not, it asks other DNS servers higher up until it finds the right IP. It then sends back the IP address (like 157.240.229.35). The browser, now having the IP address, can connect me to the real website.

This translation process, formally known as DNS resolution, requires multiple hardware components. The most important is known as the primary DNS server.

This whole process happens in milliseconds.

DNS Server Isn't Responding

Have you ever seen this error message, “DNS server isn’t responding”? This error basically means your browser asked for directions, but the DNS server didn’t answer.

From my experience, this can happen for a bunch of reasons:

  • Your internet connection dropped.
  • Your DNS cache got corrupted.
  • Your firewall or antivirus is blocking the request.
  • The DNS server itself is having issues.

The good news? It’s usually fixable. Let me take you through how to resolve this error.

How I Troubleshoot 'DNS Server Isn’t Responding'

Over the years, I’ve run into this error enough times to have a standard checklist. Here’s how I walk through it.

1. Restart everything.

Most times the DNS server may not respond due to a temporary network glitch. To solve this, I just turn off my computer and router/modem. Then wait 30-60 seconds and turn them back on.

This fixes any network-related issues.

dns server troubleshooting restart everything

A simple restart like this is enough to fix any glitch in the system, and in some cases it’s enough to make the DNS server start responding, but if not, there is another step to take.

2. Try another browser.

Sometimes it’s not DNS at all; it’s just my browser acting up. And remember, when a URL search is made, it’s the browser that asks the operating system to search for the IP address for that domain. The operating system then contacts the DNS server to match the searched website domain to its IP address; therefore, if the browser fails to complete the process, there will be an error.

If Chrome fails, I quickly test the same site in Firefox or Safari. If it works there, I know I just need to update or reset Chrome.

3. Check the firewall.

Firewalls can sometimes block DNS queries. I personally experienced this when using an overly strict antivirus, which silently blocked DNS requests. So when experiencing a DNS server issue, temporarily disabling firewalls can help confirm if that’s the issue (just don’t forget to turn them back on). Here is how to check and disable your firewall.

On Windows:

  1. Open the Control Panel.
  2. Go to Update & Security > Windows Security > Virus & Threat Protection > Manage Settings.
  3. Toggle off your firewall protection.

On macOS:

  1. Open System Preferences.
  2. Select Security & Privacy > Firewall.
  3. Turn the firewall off.

dns server troubleshooting: check firewalls

4. Flush DNS cache and reset your IP.

If the problem isn’t your browser, firewall, or router, then it could be your DNS settings. Specifically, it could be your DNS cache, which stores IP addresses and other DNS records of frequently visited domains in order to fulfill DNS queries more quickly. Flushing your DNS cache can help resolve the DNS error message.

There are several ways to do so, depending on the operating system of your device. If you’re using the latest version of Mac OS, then start by opening Finder. Then click Applications > Utilities > Terminal and type in the following command: sudo killall -HUP mDNSResponder.

dns server troubleshooting flush dns cache

Once you enter your password, you can then try to visit the website again in your browser.

For a complete guide on flushing DNS for Windows and other operating systems, check out our post Flush DNS: What It Is, How to Do It & Why You Should.

5. Change DNS server settings.

When your system is connected to the Internet, your ISP’s DNS server is the default DNS server, but sometimes it can be slow and unresponsive, and clearing the cache might not be enough. Whenever I am troubleshooting for an unresponsive DNS server, I often switch to a reliable public DNS server. My go-to options when switching are the Google DNS server (8.8.8.8 and 8.8.4.4) or the Cloudflare DNS: 1.1.1.1 and 1.0.0.1

This usually fixes persistent DNS resolution problems and can even improve browsing speed.

Here is how to change DNS settings:

1. Go to System Settings, then Network.
2. Select your Wi-Fi or Ethernet connection, then click Details or Advanced (on Mac).
3. Go to the DNS tab.
4. Click the + button and add new servers:
  • 8.8.8.8 and 8.8.4.4 (Google)
  • Or 1.1.1.1 and 1.0.0.1 (Cloudflare)
5. Click OK, then Apply.

dns server troubleshooting change dns server setting

6. Test another device or network.

If other devices work fine on the same network, the problem is likely your computer. If none of your devices can connect, it may be an ISP-level issue.

Why I Troubleshoot my DNS Server

Here’s why I take DNS troubleshooting seriously:

  • It eliminates downtime quickly. A broken DNS lookup feels like a site outage to end-users. By troubleshooting fast, I can reduce downtime and avoid lost traffic, sales, or trust.
  • It helps identify whether the issue is local or global. Sometimes the problem is just my browser or cache. Other times it’s a misconfigured DNS record that affects everyone. Troubleshooting tells me which it is.
  • It prevents bigger security risks. DNS issues aren’t always accidental. They can also be a sign of a DNS hijack or poisoning attack. If I don’t troubleshoot, I might miss a serious breach.
  • It saves time on false alarms. Early in my career, I’d panic thinking our servers were down when really, flushing the DNS cache solved everything in seconds.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure

Best DNS Servers

Your internet service provider selects your DNS servers. Most people use these assigned servers — but they don’t have to. If you’d like more speed or security, then you can try an alternative. Here are some of your best options.

1. Cloudflare DNS

dns server: cloudflare dns

Cloudflare DNS is an enterprise-grade DNS service that offers some of the fastest response times, 100% uptime, and built-in mitigation against DDoS attacks. With an average DNS lookup speed of 11ms, Cloudflare is the fastest DNS service in the world. It also has data centers in over 200 cities so it offers 100% uptime and unparalleled redundancy.

Finally, in addition to built-in DDoS protection, Cloudflare offers one-click DNSSEC to protect your application from DNS attacks.

Cloudflare also offers a free, public DNS service for those on a budget.

2. Google Public DNS

dns server: google public dns

Google Public DNS is a free, global DNS resolution service designed to be used as your primary DNS server for faster web browsing experiences. This service implements several methods for speeding up DNS lookup times, including provisioning servers, load-balancing, providing global coverage, and preventing DoS and amplification attacks which can burden DNS servers.

Keep in mind, however, that Google Public DNS, does not block or filter out unwanted sites — it is purely a DNS resolution and caching server.

3. Open DNS

DNS server, Open DNS

Used by over 90 million people, Open DNS is one of the most popular free DNS services. It combines the best of both worlds, offering speed and security.

Open DNS offers fast web browsing and 100% uptime thanks to its global data centers and peering partnerships. It also offers web filtering controls and pre-configured protection to prevent your device (or your family’s devices) from accessing unwanted sites.

4. Quad9

dns server: quad9

Quad9 is a free service designed to provide more security and privacy than your default Internet Service Provider’s DNS configuration. When your computer sends a DNS query, the Quad9 server checks a constantly updated list of threats to block lookups of malicious domain names.

In addition to protecting your computer against malware, phishing, spyware, and botnets, this can improve performance and guarantee your privacy.

5. Comodo Secure DNS

dns server: comodo secure dns

Comodo Secure DNS is a cloud-based DNS service that offers visibility, control, and protection. Comodo offers three packages.

Individuals and businesses that make less than 300,000 DNS requests per month can use the free package. This provides protection against phishing, malware, and other threats, web filtering for more than 80 content categories, a web access policy protection, and real-time visibility for all connected devices.

The premium packages can handle more requests per month and offer more advanced functionality like DNS traffic encryption.

How do I check my DNS server?

When troubleshooting or trying to optimize the speed of websites, one thing I do is check which DNS server my device is currently using. There are a couple of ways I check my DNS server.

Using a Website

This is the most common way I can check my DNS server.

To do this, I visit http://www.whatsmydnsserver.com/ and press the “Press to check your DNS server(s)” button.

dns server: checking my dns server on top10vpn application

This tool displays the public IP address of the DNS servers that contacted the test platform.

How to Find Your DNS Server IP Address on Mac

The quickest way to find your DNS server address on Mac is to:

  1. Open the Terminal by pressing the Command Key + Space Bar.
  2. Type nslookup google.com and press Enter.

How to Find Your DNS Server IP Address on Mac

Alternatively, you can click System Preferences. Then click Network. Select the network connection you want to check from the left-hand menu. Click the Advanced button, then click the DNS tab. You’ll typically see several servers listed.

dns server: finding dns server ip address on mac using the macbook setting

How to Find Your DNS Server IP Address on Windows

Finding your DNS address on Windows devices is a lot like using the macOS nslookup command line approach.

  1. Click the Start Menu button to open the Command Prompt.
  2. Type cmd, and hit Enter.
  3. Type nslookup google.com, and hit Enter.

Getting the Best Out of Your DNS Server

DNS servers may work quietly in the background, but they’re the backbone of how we access the internet. They translate human-friendly website names into machine-readable IP addresses, and when that process breaks, everything else comes to a halt.

In this post, I walked through the different types of DNS servers, how they work together, and my own approach to troubleshooting when something goes wrong. Troubleshooting is critical because if a DNS error happens, users can’t reach your site at all, which feels like downtime, even if your servers are perfectly healthy.

Make sure to use the best DNS servers, and you might save yourself the whole stress of troubleshooting.

Editor's note: This post was originally published in March 2021 and has been updated for comprehensiveness.

Free Web Hosting with HubSpot

Host your website on a fully managed and optimized infrastructure that scales with your business.

  • Fully managed hosting
  • No setup required
  • No storage, traffic, or usage hosting fees
  • Keep your website secure
Topics:

Web Hosting

Related Articles

Learn More About HubSpot's CMS with Free Web Hosting

GET HUBSPOT'S CMS SOFTWARE

CMS Hub is flexible for marketers, powerful for developers, and gives customers a personalized, secure experience

START FREE OR GET A DEMO