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:
- DNS stub resolver: Your operating system checks its local cache first. If the domain was recently resolved, it uses the cached IP address.
- 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).
- Root name server: The resolver queries a root server to find which TLD server handles the domain's extension (.com, .link, .org, etc.).
- TLD name server: The root server directs the resolver to the appropriate TLD server (e.g., the .link server for miip.link).
- Authoritative name server: The TLD server points to the authoritative server for the specific domain, which holds the actual DNS records.
- 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
| Type | Function | Example |
|---|---|---|
| Recursive resolver | Handles client queries, follows the chain until it gets an answer | 1.1.1.1 (Cloudflare), 8.8.8.8 (Google) |
| Root server | Top of the DNS hierarchy, directs to TLD servers | a.root-servers.net through m.root-servers.net |
| TLD server | Handles top-level domains (.com, .org, .net, .link) | a0.nic.link, b0.nic.link |
| Authoritative server | Holds the actual DNS records for a domain | ns1.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)
- Speed: Fastest public DNS in most benchmarks
- Privacy: Does not sell user data, deletes logs within 24 hours
- Security: Supports DNS over HTTPS (DoH) and DNS over TLS (DoT)
- Malware blocking: 1.1.1.2, Adult content: 1.1.1.3
- Best for: Privacy-conscious users who want speed
Google DNS (8.8.8.8 / 8.8.4.4)
- Speed: Very fast, globally distributed
- Reliability: 100% uptime since launch in 2009
- Privacy: Logs are kept for 48 hours, aggregated data retained longer
- Security: Supports DoH and DoT
- Best for: Users who want reliability and global coverage
Other Options
- Quad9 (9.9.9.9): Security-focused, blocks known malware domains. Based in Switzerland with strong privacy laws.
- OpenDNS (208.67.222.222): Offers content filtering and parental controls. Good for families.
- AdGuard DNS (94.140.14.14): Blocks ads and trackers at the DNS level. Great for ad-free browsing.
- Control D: Customizable blocking rules, supports DoH. Premium option for power users.
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.
- DoH (port 443): Encrypts DNS queries within HTTPS requests. Harder to block because it looks like regular HTTPS traffic.
- DoT (port 853): Encrypts DNS queries using TLS. Easier to implement at the network level but can be blocked by firewalls.
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
- Slow browsing: Switch from your ISP's DNS to Cloudflare 1.1.1.1 or Google 8.8.8.8 for faster resolution
- "DNS server not responding" error: Flush your DNS cache, try a different DNS server, or restart your router
- DNS propagation delay: After changing DNS records, wait up to 48 hours for global propagation (usually 1-4 hours)
- DNS hijacking: Malware can change your DNS settings to redirect you to fake sites. Use a trusted DNS provider and scan for malware
- DNS leak: Your VPN might leak DNS queries to your ISP. Test at dnsleaktest.com
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.