DNS Servers Explained: How DNS Works and Best Public DNS

Every time you visit a website, send an email, or use any Internet service, your device contacts a DNS server to translate domain names into IP addresses. Without DNS servers, you'd need to memorize numerical addresses like 104.21.50.120 instead of simply typing miip.link. Understanding how DNS servers work and choosing the right one can significantly improve your browsing speed, security, and privacy.

What is a DNS Server?

A DNS server (also called a DNS resolver or nameserver) is a specialized computer that stores and manages DNS records — the mappings between domain names and IP addresses. When your browser needs to find the IP address for a website, it sends a query to a DNS server, which responds with the corresponding IP address. This process is called DNS resolution and typically takes just milliseconds.

Think of DNS servers as the Internet's phonebook. Instead of looking up "John Smith" to find their phone number, your computer looks up "miip.link" to find the server's IP address. There are several types of DNS servers involved in every lookup, each playing a specific role in the resolution chain.

How DNS Resolution Works

When you type a URL in your browser, the DNS resolution process follows these steps:

  1. DNS stub resolver: Your operating system checks its local cache first. If the domain was recently resolved, it uses the cached IP address.
  2. Recursive DNS resolver: If not cached locally, your query is sent to your configured DNS resolver (usually provided by your ISP or a public DNS service).
  3. Root name server: The resolver queries a root server to find which TLD server handles the domain's extension (.com, .link, .org, etc.).
  4. TLD name server: The root server directs the resolver to the appropriate TLD server (e.g., the .link server for miip.link).
  5. Authoritative name server: The TLD server points to the authoritative server for the specific domain, which holds the actual DNS records.
  6. Final answer: The authoritative server responds with the IP address, and the resolver caches the result and returns it to your browser.

This entire process usually takes 20-120 milliseconds on the first request and is nearly instant for subsequent requests thanks to caching at every level.

Types of DNS Servers

TypeFunctionExample
Recursive resolverHandles client queries, follows the chain until it gets an answer1.1.1.1 (Cloudflare), 8.8.8.8 (Google)
Root serverTop of the DNS hierarchy, directs to TLD serversa.root-servers.net through m.root-servers.net
TLD serverHandles top-level domains (.com, .org, .net, .link)a0.nic.link, b0.nic.link
Authoritative serverHolds the actual DNS records for a domainns1.cloudflare.com, ns2.cloudflare.com

Best Public DNS Servers

Most people use their ISP's default DNS servers, but switching to a public DNS provider can improve speed, security, and privacy. Here are the best options:

Cloudflare DNS (1.1.1.1 / 1.0.0.1)

Google DNS (8.8.8.8 / 8.8.4.4)

Other Options

How to Change Your DNS Server

On Windows

1. Open Settings → Network & Internet → Change adapter options
2. Right-click your connection → Properties
3. Select "Internet Protocol Version 4 (TCP/IPv4)" → Properties
4. Select "Use the following DNS server addresses"
5. Preferred: 1.1.1.1 | Alternate: 1.0.0.1
6. Click OK

On macOS

1. Open System Preferences → Network
2. Select your connection → Advanced → DNS
3. Click "+" and add 1.1.1.1 and 1.0.0.1
4. Click OK

On Android

1. Open Settings → Network & Internet → Private DNS
2. Select "Private DNS provider hostname"
3. Enter: one.one.one.one
4. Save

On iOS

1. Open Settings → Wi-Fi
2. Tap the "i" icon on your network
3. Scroll to DNS → Configure DNS → Manual
4. Add 1.1.1.1 and 1.0.0.1

DNS Security: DoH and DoT

Standard DNS queries are sent in plaintext, meaning your ISP can see every website you visit. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt your DNS queries, preventing eavesdropping and tampering.

Most modern browsers (Chrome, Firefox, Edge) support DoH. Enable it in your browser's privacy settings for automatic encrypted DNS.

Common DNS Problems and Solutions

FAQ

Is it safe to change my DNS server?

Yes. Changing to a reputable public DNS provider like Cloudflare or Google is safe and can actually improve your security and privacy. Your DNS queries will be handled by the new provider instead of your ISP.

Which DNS server is fastest?

Cloudflare 1.1.1.1 is consistently the fastest in most benchmarks, with average response times under 15ms. Google 8.8.8.8 is a close second. Your results may vary depending on your location.

Can DNS block websites?

Yes. DNS-level blocking is used by some DNS providers (Quad9 for malware, AdGuard for ads) and by some ISPs for content filtering. It blocks the domain resolution, preventing your browser from finding the site's IP address.

Check your DNS settings and test your connection at miip.link — free DNS lookup tool included.