Internet Module 3

3.3 How DNS Finds a Website

In the previous section, we learned that DNS connects human-readable names to computer-readable information.

When someone types a domain name into a browser, the browser needs to find the technical information connected to that name.

This process is called a DNS lookup.

A DNS lookup is the process of finding the DNS information connected to a domain name.

Most of the time, this happens so quickly that people never notice it. A person types a name, presses enter, and the website appears.

Behind the scenes, though, several systems may work together to find the answer.

The Question DNS Is Trying to Answer

Let’s use this example:

www.example.com

When a browser tries to open this website, it needs to answer a question:

What technical information is connected to www.example.com?

In many cases, the browser is trying to find an IP address. The IP address tells the browser where to connect. But the browser does not usually go searching through the whole Internet by itself.

Instead, it asks for help.

Step 1: The Browser Checks What It Already Knows

Before asking other systems, the browser or device may check whether it already knows the answer.

Computers often store recent DNS answers temporarily. This is called caching.

Caching means saving information for a limited time so it can be reused quickly.

If the device recently looked up the same domain name, it may already have the answer saved.

This makes websites load faster and reduces unnecessary DNS traffic.

Step 2: The Device Asks a DNS Resolver

If the device does not already know the answer, it asks a DNS resolver.

A DNS resolver is a server that helps find DNS information for your device.

Many people automatically use the DNS resolver provided by their Internet service provider. Others use public DNS resolvers provided by technology companies, security companies, or privacy-focused services.

The resolver’s job is to find the answer and return it to your device.

The device is asking something like:

What IP address belongs to [www.example.com](http://www.example.com)?

If the resolver already has the answer saved in its own cache, it can return the answer quickly. If the resolver does not have the answer, it begins asking other DNS servers.

Step 3: The Resolver Asks the Root Servers

DNS works like a hierarchy.

At the top of that hierarchy is the DNS root. The root servers do not usually know the final IP address for every website. Instead, they help point the resolver in the right direction.

For example, if the resolver is looking for:

www.example.com

the root servers can point the resolver toward the servers responsible for .com.

A simple way to think about this is:

The resolver asks, “Where do I find information about .com?”

The root level answers, “Ask the .com servers.”

The DNS root is served by 13 named root server authorities. These are not just 13 physical machines. They are operated through many server instances around the world so DNS can remain fast and resilient.

Step 4: The Resolver Asks the TLD Servers

TLD stands for top-level domain. A top-level domain is the ending of a domain name, such as:

.com

.org

.net

.edu

.gov

.us

.uk

.ca

.ai

For www.example.com, the top-level domain is .com.

After the root servers point the resolver toward the .com servers, the resolver asks the .com servers where to find information about example.com.

The .com servers do not usually provide the final website IP address either.

Instead, they point the resolver toward the authoritative name servers for example.com.

A simple way to think about this is:

The resolver asks, “Where do I find the official DNS information for example.com?”

The .com servers answer, “Ask these authoritative name servers.”

Step 5: The Resolver Asks the Authoritative Name Server

The authoritative name server is the server that holds the official DNS records for a domain.

For example, the authoritative name server for example.com can provide the DNS records for names such as:

example.com

mail.example.com

shop.example.com

At this point, the resolver asks the authoritative name server for the record it needs.

For example:

What is the IP address for www.example.com?

The authoritative name server responds with the requested DNS information, if the record exists.

This might include an IPv4 address, an IPv6 address, or another DNS record that points to a different name.

Step 6: The Resolver Returns the Answer

After the resolver receives the answer from the authoritative name server, it sends the answer back to the user’s device.

Then the browser can use that information to connect to the correct web server.

The user does not usually see any of these steps. The user simply sees the website load.

A Simple Summary of the Lookup Path

The lookup path can be summarized like this:

  1. The browser needs to find a website.
  2. The browser or device checks its cache.
  3. The device asks a DNS resolver.
  4. The resolver checks its cache.
  5. The resolver asks the root servers.
  6. The root servers point to the correct TLD servers.
  7. The TLD servers point to the authoritative name servers.
  8. The authoritative name server provides the DNS record.
  9. The resolver returns the answer to the device.
  10. The browser uses the answer to connect to the website.

Caching and TTL

DNS lookup would be slow and inefficient if every request had to go through the full process every time.

This is why DNS uses caching.

Caching allows browsers, operating systems, routers, and DNS resolvers to save DNS answers temporarily.

These saved answers do not last forever. DNS records usually include a setting called TTL.

TTL stands for Time To Live.

TTL tells systems how long they should keep a DNS answer before checking again for updated information.

A short TTL means the information may be refreshed more often. A longer TTL means the information may be cached for a longer time.

This is why DNS changes do not always appear instantly everywhere.

If a website owner changes DNS settings, some users may see the change quickly, while others may continue seeing the older result until their cached DNS information expires.

People often call this DNS propagation.

DNS propagation is not one single event where the entire Internet updates all at once. It is more like many systems gradually refreshing their cached DNS information.

Recursive and Iterative Questions

DNS lookups involve two different kinds of questions: recursive questions and iterative questions.

The easiest way to understand the difference is to imagine asking for directions.

A recursive question is when you ask someone to find the final answer for you.

For example, imagine saying:

“Please find the address of this restaurant for me and come back with the answer.”

That is similar to what your device asks the DNS resolver to do.

Your browser or device does not want to personally ask every DNS server in the chain. It asks the resolver to handle the search and return the final answer.

This is called a recursive query.

A recursive query means:

“Please do the work and give me the final answer.”

An iterative question is different.

An iterative question does not usually return the final answer immediately. Instead, it gives the next place to ask.

For example, imagine asking someone:

“Where can I find the restaurant’s address?”

They might answer:

“I don’t know the exact address, but the city directory can help you.”

Then the city directory might say:

“Ask the restaurant office.”

Then the restaurant office finally gives you the address.

That is similar to what happens when the DNS resolver asks other DNS servers for help.

The root servers may not give the final IP address. Instead, they point the resolver toward the correct top-level domain servers.

The top-level domain servers may not give the final IP address either. They point the resolver toward the authoritative name servers for the domain.

The authoritative name server finally gives the DNS record the resolver needs.

This is called an iterative query.

An iterative query means:

“I may not have the final answer, but here is the next place to ask.”

So the basic difference is this:

A recursive query asks someone else to find the final answer.

An iterative query points to the next step in the search.

Your device usually makes a recursive query to the resolver.

The resolver then uses iterative queries as it follows the path through the DNS hierarchy.

Once the resolver finds the answer, it returns the result to your device.

When DNS Lookup Fails

Sometimes DNS lookup does not work.

If DNS cannot find the correct information, the website may not load even if the website’s server is still online.

DNS lookup can fail for several reasons.

  • The domain name may be typed incorrectly.
  • The DNS record may be missing.
  • The authoritative name server may not respond.
  • The DNS resolver may be having problems.
  • The domain may have expired.
  • The user’s network may be blocking or filtering the request.
  • The DNS information may have been changed recently and caches have not updated yet.

This is why DNS errors can be confusing.

A person may think the entire Internet is down, when the actual problem is that one name cannot be resolved.

DNS and Troubleshooting

Understanding DNS lookup helps explain common Internet problems.

If a website does not load, the problem might not be the website itself.

It could be:

  • a DNS problem
  • a browser cache problem
  • a local network problem
  • an Internet provider problem
  • a hosting problem
  • a firewall or filtering problem
  • a domain configuration problem

This is why technical support often checks DNS when investigating website issues.

DNS is one of the first steps in Internet navigation. If the name cannot be resolved, the browser may never reach the website server at all.

Why This Matters

DNS lookup is the behind-the-scenes process that helps a browser find where to go.

  1. A user types a name.
  2. The device asks for DNS help.
  3. The resolver follows the DNS hierarchy.
  4. The authoritative name server provides the official answer.
  5. The browser uses that answer to connect to the website.

This process makes the Internet feel simple, even though many systems are working in the background.

Understanding DNS lookup prepares you to understand DNS records, web hosting, CDNs, Internet outages, phishing, domain spoofing, and security investigations.

In the next section, we will look more closely at DNS records. DNS records are the specific instructions that tell systems how to handle websites, email, verification, and other services connected to a domain.