Skip to main content
Many people picture DNS as a single server that “knows” every website’s IP address. In reality, DNS resolution is a layered, cached process that involves your browser, operating system, a recursive resolver, and a hierarchy of DNS servers. This article walks through the exact sequence of steps used to resolve google.com to an IP address (for example, 142.250.183.238) and explains why DNS is fast in practice. Why this matters: the browser needs the IP address to open a TCP connection to the Google server. DNS resolution answers the question “What IP do I connect to for google.com?” and it does so with caching and a recursive lookup process.

High-level lookup sequence

  1. Browser checks its own cache.
  2. Operating system checks its DNS cache.
  3. The client queries a configured recursive resolver (usually provided by DHCP from your router or set to a public resolver).
  4. If the resolver has no cache entry, it performs recursive queries:
    • Query a root name server for the .com TLD servers.
    • Query a .com TLD server for authoritative name servers for google.com.
    • Query one of Google’s authoritative name servers for google.com’s A/AAAA record.
  5. The resolver returns the final IP to your OS, which returns it to the browser.
  6. The browser initiates the TCP handshake with the returned IP.

Local caches (examples)

First the browser checks its cache. If you visited Google recently, the browser may have an entry and can use it immediately:
If the browser doesn’t have the address, it asks the operating system. The OS maintains a DNS cache shared by all applications:
If neither cache contains the IP, your machine queries the recursive resolver configured for the network.
A dark-themed infographic diagram explaining DNS caching and name resolution, showing a browser, operating system, Wi‑Fi router, ISP resolver, root/.com servers, and Google's authoritative nameserver. It illustrates resolving google.com to an IP address (142.250.183.238) with cache labels at each step.

What is a recursive resolver and how your device finds it

When your laptop connects to the network (typically via DHCP from a Wi‑Fi router or corporate network), the network supplies the IP address of one or more DNS resolvers. These resolvers are often:
  • Provided by your ISP
  • Public resolvers like Google Public DNS or Cloudflare
  • A recursive resolver running on your router or in your local network
Your client sends a DNS query to the resolver (usually using UDP to port 53). If the resolver has the answer cached, it returns it immediately. If not, the resolver performs the steps required to find the authoritative answer and then caches the result according to the DNS record’s TTL.

The hierarchical DNS server types

Typical recursive resolver flow for resolving google.com

  • Resolver asks a root server: “Which servers are authoritative for .com?”
  • Root replies with the list of .com TLD servers.
  • Resolver asks a .com TLD server: “Which servers are authoritative for google.com?”
  • TLD responds with the names (and sometimes glue addresses) of Google’s authoritative name servers (e.g., ns1.google.com).
  • Resolver asks one of Google’s authoritative servers: “What’s the A or AAAA record for google.com?”
  • Authoritative server replies with the IP address (for example, 142.250.183.238).
  • Resolver caches the response (respecting TTL) and returns the IP to your OS and then the browser.
Because the recursive resolver performs those intermediate queries on behalf of your client, it’s called a recursive resolver from the client’s perspective.

Ports, transport, and special cases

  • DNS queries usually use UDP on port 53 for performance and to minimize TCP connection overhead.
  • DNS can fall back to TCP on port 53 for larger responses (DNSSEC, large zone transfers, or responses that exceed UDP size limits).
  • DNS over TLS (DoT) and DNS over HTTPS (DoH) are modern options that wrap DNS in encrypted transports; they use different ports and improve privacy.

Caching and TTL: why DNS is fast

Caching is essential to DNS performance. Records are cached at:
  • Browser
  • Operating system
  • Recursive resolver
  • Possibly intermediate caches/CDNs
Because each cache stores results for the record’s TTL (time-to-live), repeated lookups for popular domains rarely require the resolver to start at the root servers every time.

Quick glossary

Further reading and references

DNS lookups are fast in practice because of caching at multiple layers. Also remember DNS queries typically use UDP/53, but they can use TCP/53 when necessary (e.g., large responses).

Watch Video