DNS Lookup Guide: How Domain Name Resolution Works

From typing a URL to receiving a response — the journey through the DNS hierarchy that happens in milliseconds.

NetworkingApril 11, 20268 min read

What Is DNS?

DNS (Domain Name System) is the internet's phone book. When you type risetop.top into your browser, DNS translates that human-readable domain into an IP address like 192.3.76.153 that routers and servers can actually use. Without DNS, you'd need to memorize numerical addresses for every website — which is what the ARPANET pioneers did before 1983.

Despite being invisible to most users, DNS is one of the most critical pieces of internet infrastructure. When DNS fails, the internet effectively stops working — which is exactly what happened during the October 2021 Facebook outage when a BGP misconfiguration cascaded into DNS resolution failures.

The DNS Resolution Process

Here's what happens when you visit blog.risetop.top for the first time:

  1. Browser cache check: Your browser checks its own DNS cache. If it recently resolved this domain, it skips the entire lookup. Cache entries typically last 60–300 seconds.
  2. OS resolver: The browser asks the operating system's DNS resolver, which checks /etc/hosts first, then its own cache.
  3. Recursive resolver: If the OS doesn't know the answer, it forwards the query to a recursive DNS resolver (usually provided by your ISP or a public resolver like 1.1.1.1 or 8.8.8.8).
  4. Root nameserver: The recursive resolver queries a root nameserver, which responds with the TLD nameserver for .top.
  5. TLD nameserver: The resolver queries the .top TLD nameserver, which responds with the authoritative nameserver for risetop.top.
  6. Authoritative nameserver: The resolver queries the authoritative nameserver for risetop.top, which returns the A record (IP address) for blog.risetop.top.
  7. Response: The IP is returned to the browser, which establishes a TCP connection to the server.

This entire process typically completes in 20–120 milliseconds. The key optimization: caching at every step means most lookups never reach step 4.

DNS Record Types You Need to Know

RecordPurposeExample
AIPv4 addressrisetop.top → 192.3.76.153
AAAAIPv6 addressrisetop.top → 2606:4700::6810:...
CNAMEAlias to another domainblog.risetop.top → risetop.top
MXMail serverrisetop.top → mail.risetop.top
TXTText data (SPF, DKIM, verification)v=spf1 include:_spf.google.com ~all
NSAuthoritative nameserversns1.cloudflare.com
SOAStart of authority (zone metadata)Primary NS, admin email, serial
SRVService location_sip._tcp.risetop.top

CNAME: The Alias Record

CNAME records point one domain to another. Common uses include pointing www.example.com to example.com, or mapping api.example.com to a load balancer endpoint. The critical rule: you cannot have a CNAME at the zone apex (the bare domain). example.com needs an A/AAAA record, not a CNAME. Some DNS providers offer "ALIAS" or "ANAME" pseudo-records as a workaround.

TXT Records: More Than Just Text

TXT records have become the backbone of domain verification. You'll create TXT records for:

TTL: Time to Live

Every DNS record has a TTL value (in seconds) that tells resolvers how long to cache the result. This is one of the most consequential settings in DNS:

Troubleshooting DNS Problems

When a domain "doesn't work," DNS is usually the culprit. Here's your debugging toolkit:

# Query a specific record type
dig A risetop.top
dig MX gmail.com
dig TXT _dmarc.risetop.top

# Trace the full resolution path
dig +trace blog.risetop.top

# Check from a specific resolver
dig @1.1.1.1 risetop.top
dig @8.8.8.8 risetop.top

# Windows equivalent
nslookup risetop.top 1.1.1.1

# Check propagation globally
# Use: https://www.whatsmydns.net/

Common issues and fixes:

DNS Lookup Tools

For quick checks without opening a terminal, [RiseTop's DNS lookup tool](/tools/dns-lookup.html) lets you query any domain and see all record types — A, AAAA, CNAME, MX, TXT, NS, and SOA — from multiple resolvers. It's useful for verifying that your DNS changes have propagated or diagnosing why a domain isn't resolving as expected.

Key Takeaways