You type https://buildfailed.dev/blog, press Enter, and the page appears. It feels like one action, but the browser has a few things to figure out first.
One of them is where to connect. You gave it a name, buildfailed.dev. To reach the website, it needs an IP address.
DNS, the Domain Name System, helps it find that address. It works a little like the contacts on your phone: you choose a name, and the phone looks up the number behind it.
It started with a shared file
Before DNS, early Internet hosts relied on a file called HOSTS.TXT. It listed computer names and their addresses. A central organization maintained it, and other computers downloaded copies.
That became awkward as the network grew. Every new computer or address change meant another update to a shared list. Organizations had to wait for someone else to make their changes available.
Paul Mockapetris's 1983 DNS proposal offered a different approach: let organizations manage their own part of the directory, and let computers ask for the information they need. That distributed design is still at the heart of DNS.
What happens when you open a website?
Let's follow a visit to https://buildfailed.dev/blog.
The browser needs an address for buildfailed.dev. The /blog part comes later, when it asks the web server for a page.
The answer may already be available in a cache, a temporary store of earlier results. Otherwise, the browser or operating system asks a resolver: a DNS service that looks up names on its behalf. Your Internet provider, company network, or browser settings may determine which resolver you use.
If that resolver also needs to look up the answer, it follows a chain of directions:
- A root nameserver points it toward the servers responsible for
.dev. - A
.devnameserver points it toward the servers responsible forbuildfailed.dev. - An authoritative nameserver for the domain returns its address records.
“Authoritative” simply means the server is responsible for serving those DNS records. The resolver brings the answer back to your device and can keep a temporary copy for the next request.
This full trip is not necessary every time. Cached answers and directions let the resolver skip work, which makes repeated lookups faster.
What the answer actually looks like
DNS does not turn letters into numbers using a formula. It looks up records configured for the name.
You can see this yourself with dig, a command-line DNS tool:
dig buildfailed.dev A +noall +answer
Here is the response observed on November 3, 2026:
buildfailed.dev. 300 IN A 162.159.140.98
buildfailed.dev. 300 IN A 172.66.0.96
The useful part is on the right: the lookup returned two IPv4 addresses. A is the DNS record type for an IPv4 address. The 300 tells us how long the answer may normally be cached; we'll come back to that.
A domain can have several addresses. They might lead to a hosting platform or a content delivery network that serves the website. They can also change, so your result may differ from this snapshot.
IPv4 and IPv6, without the jargon
IP stands for Internet Protocol. It gives network packets source and destination addresses so they can travel between networks. IPv4 and IPv6 are two versions of that protocol.
| IPv4 | IPv6 | |
|---|---|---|
| Example address | 192.0.2.20 |
2001:db8::20 |
| Address size | 32 bits | 128 bits |
| DNS record | A |
AAAA |
These example addresses are reserved for documentation. IPv4 uses four numbers separated by dots. IPv6 uses groups of hexadecimal digits separated by colons; :: shortens a run of zero groups.
IPv4 has about 4.3 billion possible address values, some reserved for special purposes. That is a tight limit for a worldwide network. Your home router often deals with it by letting several devices share one public IPv4 address through NAT, or Network Address Translation.
IPv6 provides a vastly larger address space. Both versions are in use. When a website supports both, it can publish A and AAAA records for the same name. The browser can look up both and try suitable connections based on what the network supports.
You still type the same domain name. DNS supplies the addresses; the browser and network handle the connection.
How DNS fits with TCP, TLS, and HTTPS
There are two exchanges to think about: finding the website's address and connecting to the website.
The DNS lookup itself needs to cross the network. Traditional DNS uses UDP or TCP on server port 53. Small queries commonly use UDP, which can send a message without first setting up a TCP connection. If a reply is lost, the DNS client handles retrying.
TCP is also a normal part of DNS. For example, if an answer is too large for the permitted UDP response size, the server can mark it as incomplete and the client can retry over TCP.
Once the browser has an address, a new HTTPS connection using HTTP/1.1 or HTTP/2 follows a different sequence:
- TCP establishes a connection to the server, normally on port 443.
- TLS checks the server's identity and sets up encryption.
- HTTP carries the request for
/blogand the response containing the page.
The browser still checks the server's certificate against buildfailed.dev. Finding an IP address does not make the domain name irrelevant, especially when several websites share an address.
With HTTP/3, the browser uses QUIC over UDP, with TLS integrated into the connection setup. DNS still helps find the destination. Existing connections can be reused, so loading another image or page does not always mean starting over.
Is the DNS lookup encrypted too?
An HTTPS website protects the web connection. The DNS lookup needs its own protection.
DNS over HTTPS (DoH) sends DNS queries inside HTTPS exchanges. DNS over TLS (DoT) protects them with TLS directly. When used between your device and its resolver, these methods encrypt that part of the journey. The resolver still sees the name you ask about.
You may also encounter DNSSEC. It lets a validating resolver check digital signatures on signed DNS data. It helps verify the answer's authenticity; it does not encrypt the lookup.
Why a DNS change does not appear everywhere at once
Remember the 300 in our response? It is the TTL, or time to live, measured in seconds. In this case, the answer can normally be cached for up to five minutes.
Imagine a resolver saves your website's old address at 10:00. At 10:01, you move the site and update its DNS record. That resolver can still return the old address until about 10:05, while another resolver already returns the new one.
The change does not instantly replace every cached copy. This is why a website can appear to work for one person while another still reaches the old server.
For a planned move, lower the TTL ahead of time and let the previous TTL expire before switching addresses. Changing it at the last minute does not shorten the lifetime of answers already cached.
DNS also helps with more than websites
The record type tells DNS what you are asking for. We have used A for IPv4 and AAAA for IPv6, but an email server asks a different question: where should mail for this domain go? MX records provide that information.
A CNAME makes one name an alias of another. For example, www.example.com could point to a hostname supplied by a hosting service. The lookup follows that name to find an address. This does not itself change the URL in the browser; an HTTP redirect is a separate action.
When something fails, the distinction between DNS and HTTP helps you decide where to look. NXDOMAIN means DNS reports that the requested name, or an alias target, does not exist. 404 Not Found means a web server answered but could not find the requested page.
If DNS returned an address but the connection timed out, check connectivity and the server itself. A successful lookup tells you where to try; it cannot guarantee that the website is running.
To follow the next part of the journey, read How Secure Web Connections Work: HTTPS, TLS, TCP, UDP & QUIC.
