Domain names are human-friendly names for websites, such as www.example.com, while computers communicate using IP addresses, such as 93.184.216.34. The Domain Name System, or DNS, acts like a global directory that translates names into addresses. This matters because people can remember words more easily than long strings of numbers.
Every time you visit a website, send an email, or use many online apps, DNS helps connect your device to the right server.
When you type a domain name, your device usually asks a DNS resolver to find the matching IP address. If the answer is not already cached, the resolver may contact root servers, top-level domain servers, and authoritative name servers in order. The result is returned to your device, which can then open a connection to the web server.
DNS also uses records, time limits, and caching to make lookups faster and reduce traffic across the internet.
Key Facts
- A domain name maps a readable name to an IP address, such as www.example.com to 93.184.216.34.
- DNS lookup path: client to recursive resolver to root server to TLD server to authoritative name server.
- A record: domain name to IPv4 address, for example example.com to 93.184.216.34.
- AAAA record: domain name to IPv6 address, for example example.com to 2606:2800:220:1:248:1893:25c8:1946.
- TTL means time to live and tells caches how many seconds a DNS answer may be reused.
- Total lookup time can be estimated as T = n × RTT when n sequential network round trips are needed.
Vocabulary
- Domain name
- A domain name is a readable internet name that identifies a service or website, such as www.example.com.
- IP address
- An IP address is a numerical network address used to locate a device or server on the internet.
- DNS resolver
- A DNS resolver is a server that receives DNS questions from clients and finds or returns the matching answer.
- Authoritative name server
- An authoritative name server stores the official DNS records for a domain.
- DNS record
- A DNS record is a stored piece of information that connects a domain name to data such as an IP address or mail server.
Common Mistakes to Avoid
- Confusing a domain name with a website is wrong because the domain is only the address label, while the website is the content served after a connection is made.
- Assuming DNS always contacts every server is wrong because cached answers can skip much of the lookup process.
- Thinking one domain has only one IP address is wrong because domains can use multiple records for load balancing, redundancy, or different network types.
- Ignoring TTL values is wrong because cached DNS answers can remain in use until their time to live expires, even after a record is changed.
Practice Questions
- 1 A DNS resolver needs 4 sequential round trips to answer a query, and each round trip takes 25 ms. Estimate the total DNS lookup time.
- 2 A DNS record has a TTL of 1800 seconds. Convert this TTL to minutes, and state how long a cache may reuse the answer.
- 3 A student says that typing www.example.com sends the browser directly to the web server without any translation step. Explain why this is incomplete and describe the role of DNS in the process.