Chapters & contents Lesson 5 of 20
3 min read
Computer networksExpanded reading

How DNS finds a service

Follow a name lookup without confusing DNS, routing, and application behavior.

What you’ll learn

  • Distinguish recursive and authoritative roles
  • Explain caching and TTL at a high level
  • Diagnose a naming failure separately from an application failure

A name is not a network address

A learner types a human-readable hostname into a browser, but network delivery needs addressing information. DNS provides a distributed naming system that can supply records associated with a name, including address records. DNS does not send the HTTP request or decide how the application handles it. Separating naming, connection setup, and application response is essential when troubleshooting: an application cannot return its normal page if the client cannot obtain the information needed to reach it.

Distinguish the lookup roles

A client typically asks a recursive resolver to find an answer. The resolver may already have an appropriate cached result, or it may query other DNS servers to follow the naming hierarchy. Authoritative servers supply answers for zones they serve. These roles can be implemented in different systems and should not be reduced to the idea of one global DNS database. A simplified diagram can show the client, resolver, hierarchy, authoritative service, and the answer returning to the client.

Understand the effect of caching

DNS responses can be cached according to their applicable rules and time-to-live information. Caching reduces repeated work and lookup delay, but it also affects how quickly changes are observed. When a service address changes, different clients may temporarily receive different answers because of cache state. Do not promise that editing a record moves every user at one exact instant. Plan migrations with the relevant TTLs, deployment overlap, and verification from more than one network perspective.

A successful lookup is one step

Obtaining an address does not prove that the service is healthy. The address may be unreachable from the client, a firewall may reject the connection, TLS validation may fail, or the application may return an error. Conversely, a name-resolution failure should not immediately be treated as an application bug. Keep the diagnostic sequence layered: identify the name being queried, inspect the answer, check connectivity and transport, then inspect the application exchange. Changing unrelated settings makes the evidence harder to interpret.

Investigate carefully

For a domain you own or an authorized exercise, inspect the configured record and query it using an appropriate read-only DNS tool. Record which resolver answered and whether the result matches the expected service. If a migration appears inconsistent, consider caching before deleting or repeatedly replacing records. Keep private internal names and network details out of public screenshots when they are sensitive. The goal is a reproducible explanation of the lookup, not a collection of commands run without a hypothesis.

Try it yourself

A DNS query returns the expected address, but the browser receives a connection refusal. Which conclusion is justified?

Show a possible solution

The name lookup succeeded for that query. A connection refusal points to a later connectivity or service-listening issue; it does not by itself establish that DNS is broken or that the application logic ran.

Check your understanding

Try 14 questions across computer networks. Read each explanation and revisit anything that needs another pass.

Practise this subject

Go to the source

Use these primary references to check details and explore the topic further.

Saved in this browser. Signed-in progress syncs to your account.