Back to all articles

What is a DNS Server? How DNS Servers Work and Types Explained

February 1, 2026
By DNS Expert
DNS ServerNetworkingInfrastructure

What is a DNS Server?

A DNS server (Domain Name System server) is a specialized computer server that stores a database of domain names and their corresponding IP addresses. DNS servers respond to queries from client devices, translating human-readable domain names into machine-readable IP addresses.

Think of DNS servers as automated phone books that instantly look up and provide the "phone number" (IP address) for any "name" (domain) you want to contact.

How DNS Servers Work

When you type a website address into your browser, here's the role DNS servers play:

The Query Process

  1. Client Request: Your device sends a DNS query (e.g., "What's the IP for google.com?")
  2. Server Lookup: The DNS server searches its database
  3. Response: The server returns the IP address (e.g., 142.250.185.46)
  4. Connection: Your browser uses this IP to connect to the website

This entire process typically takes just milliseconds.

Types of DNS Servers

The DNS system relies on several types of servers working together:

1. DNS Resolver (Recursive Resolver)

The first stop for DNS queries, usually operated by your ISP or a public DNS provider.

Functions:

  • Receives queries from client devices
  • Performs the complete resolution process
  • Caches results for faster future lookups
  • Returns the final IP address to the client

Examples:

  • Your ISP's DNS server
  • Google Public DNS (8.8.8.8)
  • Cloudflare DNS (1.1.1.1)
  • Quad9 (9.9.9.9)

2. Root Nameservers

The highest level in the DNS hierarchy, directing queries to the appropriate TLD servers.

Key Facts:

  • Only 13 root server addresses (but hundreds of actual servers using anycast)
  • Managed by 12 different organizations worldwide
  • Handle millions of queries per second
  • Rarely change and extremely reliable

Root server identifiers: A through M (a.root-servers.net through m.root-servers.net)

3. TLD Nameservers (Top-Level Domain)

Manage information for top-level domains like .com, .org, .net, .edu, and country codes like .uk, .ca.

Responsibilities:

  • Store information about domains within their TLD
  • Direct queries to authoritative nameservers
  • Manage domain registrations at the TLD level

Examples:

  • VeriSign operates .com and .net TLD servers
  • Public Interest Registry manages .org
  • Each country manages its ccTLD servers

4. Authoritative Nameservers

The final source of truth for specific domain information.

Functions:

  • Store actual DNS records for domains
  • Provide definitive answers (not cached)
  • Updated when domain owners make changes
  • Multiple servers for redundancy

Example: For example.com, nameservers like ns1.example.com and ns2.example.com are authoritative.

Primary vs. Secondary DNS Servers

Primary (Master) DNS Server

  • Contains the original, editable zone files
  • Where DNS administrators make changes
  • Source of truth for the domain

Secondary (Slave) DNS Server

  • Contains read-only copies of zone files
  • Automatically syncs with the primary server
  • Provides redundancy and load distribution
  • Takes over if the primary server fails

Best Practice: Always configure at least two nameservers (one primary, one secondary) for reliability.

Public DNS Servers vs. ISP DNS Servers

ISP DNS Servers

Advantages:

  • Automatically configured
  • Local caching may improve performance
  • No configuration needed

Disadvantages:

  • May be slower or less reliable
  • Potential for logging and tracking
  • May redirect failed queries to ad pages
  • May implement censorship

Public DNS Servers

Popular Options:

Google Public DNS

  • Primary: 8.8.8.8
  • Secondary: 8.8.4.4
  • IPv6: 2001:4860:4860::8888 and 2001:4860:4860::8844
  • Pros: Fast, reliable, global anycast network
  • Cons: Google may log queries for analytics

Cloudflare DNS

  • Primary: 1.1.1.1
  • Secondary: 1.0.0.1
  • IPv6: 2606:4700:4700::1111 and 2606:4700:4700::1001
  • Pros: Privacy-focused, promises not to log, extremely fast
  • Cons: Newer service (launched 2018)

Quad9

  • Primary: 9.9.9.9
  • Secondary: 149.112.112.112
  • IPv6: 2620:fe::fe and 2620:fe::9
  • Pros: Blocks malicious domains, privacy-focused, non-profit
  • Cons: Blocking may occasionally cause issues

OpenDNS

  • Primary: 208.67.222.222
  • Secondary: 208.67.220.220
  • Pros: Content filtering options, phishing protection
  • Cons: May require account for full features

How to Change Your DNS Server

Windows

  1. Open Control Panel > Network and Internet > Network Connections
  2. Right-click your connection > Properties
  3. Select "Internet Protocol Version 4 (TCP/IPv4)"
  4. Click Properties
  5. Select "Use the following DNS server addresses"
  6. Enter preferred and alternate DNS servers
  7. Click OK

macOS

  1. Open System Preferences > Network
  2. Select your connection > Advanced
  3. Click the DNS tab
  4. Click + to add DNS servers
  5. Enter DNS addresses
  6. Click OK > Apply

Linux

Edit /etc/resolv.conf:

sudo nano /etc/resolv.conf

Add lines:

nameserver 1.1.1.1
nameserver 8.8.8.8

Router (affects all devices)

  1. Access router admin panel (usually 192.168.1.1 or 192.168.0.1)
  2. Find DNS settings (often under WAN or Internet settings)
  3. Enter preferred DNS servers
  4. Save and reboot router

DNS Server Performance Factors

Speed

Measured by query response time:

  • Excellent: < 20ms
  • Good: 20-50ms
  • Average: 50-100ms
  • Slow: > 100ms

Reliability

  • Uptime: 99.99% or higher
  • Redundancy: Multiple server locations
  • DDoS protection: Ability to handle attacks

Privacy

  • Logging policies: What data is collected and for how long
  • Third-party sharing: Is data sold or shared
  • Encryption: Support for DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT)

Advanced DNS Server Features

DNS Caching

Stores recent query results to speed up repeated requests:

  • Reduces query latency
  • Decreases load on upstream servers
  • Respects TTL (Time To Live) values

Load Balancing

Distributes queries across multiple servers:

  • Round-robin DNS
  • GeoDNS (location-based responses)
  • Weighted responses

Security Features

Modern DNS servers may include:

  • DNSSEC validation: Verifies cryptographic signatures
  • Malware blocking: Prevents access to known malicious domains
  • Phishing protection: Blocks fraudulent sites
  • Ad blocking: Filters advertising domains

Anycast Routing

Single IP address served by multiple server locations:

  • Queries automatically route to nearest server
  • Improves performance and reliability
  • Used by major public DNS providers

Troubleshooting DNS Server Issues

DNS Server Not Responding

Solutions:

  1. Check network connection
  2. Restart router and modem
  3. Flush DNS cache
  4. Try alternate DNS servers
  5. Check firewall settings

Slow DNS Resolution

Solutions:

  1. Switch to faster public DNS (test with tools like namebench)
  2. Clear DNS cache
  3. Check for ISP issues
  4. Reduce distance to DNS server (use anycast providers)

Domain Not Resolving

Solutions:

  1. Verify domain exists and is registered
  2. Check if DNS servers are authoritative for the domain
  3. Wait for DNS propagation (up to 48 hours)
  4. Test with nslookup or dig
  5. Verify nameserver configuration

Conclusion

DNS servers are the unsung heroes of the internet, performing billions of queries daily to keep websites accessible. Understanding how they work helps you:

  • Choose the right DNS provider for your needs
  • Troubleshoot connectivity issues effectively
  • Improve browsing performance by selecting faster servers
  • Enhance privacy and security with protective DNS services

Whether you stick with your ISP's DNS servers or switch to a public alternative, knowing the role of DNS servers empowers you to make informed decisions about your internet infrastructure.


Related Articles: