What Is DNS and How Does It Work?
Learn how DNS turns domain names into IP addresses, how servers and caches handle a lookup, and why finding an address differs from loading a page.
DNS, short for Domain Name System, helps computers find services using names people can remember. When you visit a website, DNS can look up its address. This article explains how that lookup works and how it differs from loading the page.

What DNS does
A domain name is a readable name such as example.com. An IP address is a numeric address that computers use to send data across networks. DNS links names to addresses, so you do not need to remember the numbers.
IP stands for Internet Protocol, the rules used to address and send that data. IPv4 and IPv6 are two versions of this protocol. IPv6 provides a much larger supply of addresses than IPv4.
DNS stores information in records. An A record holds an IPv4 address, such as 192.0.2.10. An AAAA record holds an IPv6 address, which has a longer format. Other records help route email and support other services.
A domain does not always point to one fixed address. A website may use several addresses, and those addresses can change while its name stays the same.
How a DNS lookup works
Suppose you enter https://example.com in your browser. To connect, the browser needs an IP address for example.com. It may already have a usable answer saved locally.
A cache is temporary storage for information that may be needed again. Your browser or operating system may keep DNS answers in a cache. Reusing an answer avoids repeating the full lookup.
If no usable answer is saved locally, your computer usually asks a resolver. A resolver is software that finds DNS answers for you. Your internet provider, workplace, or a public DNS service may run it.
The resolver checks its own cache first. If it needs more information, it asks other DNS servers. Each handles a different part of the naming system.
A root server can direct the resolver to servers responsible for .com. The .com servers can then direct it to the authoritative servers for example.com. These replies give directions rather than the website’s address.
An authoritative server holds the official DNS records for the part of the naming system it serves. The resolver asks it for the address record, then sends the answer back to your computer. Cached information often lets it skip some steps.

A DNS lookup is separate from loading a page
Imagine a DNS record maps www.example.com to 192.0.2.10. That address is reserved for use in documentation. This is an example, not a live lookup result.
DNS supplies the address. Your browser then uses it to connect to the server. For HTTPS, the browser sets up an encrypted connection, which protects data while it travels.
As part of that setup, the browser checks the website’s certificate. This digital proof helps the browser confirm that the encrypted connection is with the requested website. The browser can then request page content.
The server sends content that the browser uses to display the page. Images or scripts hosted under other names may need more DNS lookups.
Finding an address does not guarantee a working website. The server could be down, or the connection could fail after DNS has done its job.
Why DNS caches matter
Caching cuts down on repeated queries and can make lookups faster. DNS records include a time to live, or TTL. This value tells caches how long an answer may be reused.
If a website changes its address, some visitors may still get the old cached answer until it expires. That helps explain why a DNS change can appear to work for one person before another.
When a website fails to open, read the browser’s error message before changing settings. A name lookup error points toward DNS. A connection or certificate error needs different checks.
Need Help With DNS?
DNS problems can be difficult to troubleshoot, especially when DNSSEC validation, DNS configuration, or network connectivity issues are involved.
At FOO.XYZ, we help businesses troubleshoot DNS, secure their networks, and manage Linux/FreeBSD infrastructure.
Phone: (213) 212-8317
Email: hello@foo.xyz
Los Angeles network engineering, DNS troubleshooting, and infrastructure support.