A name server is a computer server that stores and serves domain name system (DNS) records, translating human‑readable domain names (e.g., www.example.com) into the numerical IP addresses required for routing traffic on the Internet. Name servers are a fundamental component of the DNS infrastructure, enabling the distributed lookup of domain names across the global network.
Functions
| Function | Description |
|---|---|
| Resolution | Responds to DNS queries by providing the appropriate DNS record (e.g., A, AAAA, MX, CNAME) for a requested domain name. |
| Authority | Hosts authoritative data for one or more DNS zones. When a query falls within a zone for which the server is authoritative, it supplies the definitive answer. |
| Caching | Stores recent query results temporarily to reduce latency and network traffic. Caching can be performed by recursive (resolver) name servers. |
| Forwarding | May forward queries it cannot answer to other name servers, such as upstream resolvers or root servers. |
Types of Name Servers
-
Authoritative Name Servers
- Provide definitive answers for zones they manage.
- Can be primary (master), where zone data is manually configured, or secondary (slave), which obtain zone data via zone transfers (AXFR/IXFR) from the primary.
-
Recursive (Resolver) Name Servers
- Accept queries from end‑user devices (e.g., computers, phones) and perform the full resolution process, recursively querying other name servers on behalf of the client.
- Typically operated by ISPs, corporate networks, or public DNS services (e.g., Google Public DNS, Cloudflare DNS).
-
Root Name Servers
- The highest level of the DNS hierarchy; they know the locations of the authoritative servers for all top‑level domains (TLDs).
- There are 13 logical root server identities (labeled A–M) operated by various organizations, each distributed globally via anycast.
-
Caching Name Servers
- Store query results for a configurable TTL (time‑to‑live) to speed up subsequent lookups. Many recursive servers also function as caching servers.
Operation Workflow (Simplified)
- Client Query – A client sends a DNS query to its configured resolver (often a recursive name server).
- Cache Check – The resolver checks its cache; if a valid record exists, it returns the result.
- Recursive Lookup – If not cached, the resolver queries a root server, which directs it to the appropriate TLD server.
- TLD Query – The TLD server returns the authoritative server for the second‑level domain.
- Authoritative Query – The resolver queries the domain’s authoritative name server, which returns the final DNS record.
- Response – The resolver caches the answer (subject to TTL) and returns it to the client.
DNS Record Types Commonly Served
| Record | Purpose |
|---|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| MX | Mail exchange server |
| CNAME | Canonical name (alias) |
| NS | Authoritative name server for a zone |
| TXT | Arbitrary text (often used for verification, SPF, DKIM) |
| SOA | Start of Authority – zone metadata (e.g., serial number, refresh interval) |
| SRV | Service location (used for protocols like SIP, XMPP) |
Security Considerations
- DNSSEC (Domain Name System Security Extensions) – Provides cryptographic signing of DNS data to authenticate responses and protect against cache poisoning and spoofing. Authoritative name servers must be configured to sign and serve DNSSEC records, and resolvers must be capable of validating signatures.
- Access Controls – Zone transfers (AXFR/IXFR) between primary and secondary authoritative servers are typically restricted to trusted IP addresses to prevent unauthorized copying of zone data.
- Rate Limiting & Amplification Mitigation – Recursive servers may implement query rate limiting and response size restrictions to reduce susceptibility to DNS amplification attacks.
Configuration Practices
- Redundancy – Zones are usually served by at least two authoritative name servers located in different network or geographic locations to ensure high availability.
- TTL Optimization – Administrators set TTL values based on how frequently records change; shorter TTLs allow faster updates but increase query load.
- Monitoring – Continuous health checks (e.g., using DNS probing tools) help detect outages or misconfigurations promptly.
Notable Public DNS Services
| Service | Primary IPv4 | Primary IPv6 | Notable Features |
|---|---|---|---|
| Google Public DNS | 8.8.8.8 | 2001:4860:4860::8888 | High performance, DNSSEC validation (optional) |
| Cloudflare DNS | 1.1.1.1 | 2606:4700:4700::1111 | Fastest reported latency, built‑in DNS over HTTPS (DoH) and DNS over TLS (DoT) |
| Quad9 | 9.9.9.9 | 2620:fe::fe | Security‑focused, blocks domains known for malware |
Standards and RFCs
- RFC 1034 – “Domain Names – Concepts and Facilities” (1993)
- RFC 1035 – “Domain Names – Implementation and Specification” (1993)
- RFC 2181 – Clarifications to the DNS specification (1997)
- RFC 4033‑4035 – DNSSEC protocol suite (2005)
- RFC 6891 – Extension mechanisms for DNS (EDNS(0)) (2013)
These documents define the protocol, data formats, and operational guidelines for name servers within the global DNS system.