How DNS works

What DNS solves

See DNS as the distributed system that lets a stable domain name point to services whose addresses can change.

8 minute lesson

~~~

You rarely open a website by typing its IP address. You use a name such as flaviocopes.com.

The Domain Name System, or DNS, is a distributed directory. It lets you ask a precise question such as “what IPv4 addresses belong to this hostname?” or “which servers accept email for this domain?”

The record type is part of the question. These are separate lookups:

dig A flaviocopes.com
dig AAAA flaviocopes.com
dig MX flaviocopes.com

A asks for IPv4 addresses, AAAA asks for IPv6 addresses, and MX asks where email should be delivered. A successful answer to one question says nothing about the others.

Your device normally sends the question to a recursive resolver operated by your network, company, or a public DNS provider. The resolver finds the authoritative source and caches the answer for a limited time. This division makes DNS scale: no single server contains every record and authoritative servers do not handle every browser lookup directly.

A stable name separates an application’s public identity from its current infrastructure. You can move a service to a new address and update DNS instead of teaching every client a new name.

DNS only supplies naming information. An address answer does not open a TCP connection, negotiate TLS, or return a web page. Those steps happen afterward, and each can fail while DNS is healthy.

Your action is to query one domain for A, AAAA, and MX. Write down which questions return answers and explain why an empty AAAA answer does not prove the domain is broken.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →