Back to blog

Networking ยท 2026-03-14

DNS Basics: What Happens When I Type a Website Name

DNS is like a naming system for the internet. It turns names that humans remember into IP addresses that computers use.

Why DNS matters

Without DNS, I would need to remember IP addresses for every website. DNS lets me type a name, then my computer asks a resolver for the matching address.

DNS matters in both networking and cybersecurity because many problems start with names. If DNS fails, websites may not open even when the network connection is fine. If DNS is abused, users may be sent to the wrong destination.

The basic flow

  1. The browser checks local cache.
  2. The computer asks its configured DNS resolver.
  3. The resolver finds the answer or asks other DNS servers.
  4. The IP address is returned and cached for a period of time.

Caching is important because it reduces repeated lookups. If a name was recently resolved, the answer may be reused until the TTL expires. TTL means time to live, and it controls how long a DNS answer can be cached.

Records I am learning

A records point to IPv4 addresses. AAAA records point to IPv6 addresses. CNAME records point one name to another name. MX records are used for mail servers.

For troubleshooting, I do not need to memorize every DNS record at once. I first focus on A, AAAA, CNAME, and MX because they appear often in beginner labs and real website setups.

Commands to practice

I use nslookup or dig to ask DNS questions directly. This helps me separate a DNS problem from a general network problem.

Example troubleshooting thought process

If I can ping 8.8.8.8 but cannot open example.com, the network path may be working while DNS is failing. In that case, I check the configured DNS server, try nslookup example.com, and compare results using another resolver.

Common mistakes

  • Assuming the internet is down when only DNS is failing.
  • Forgetting that cached DNS answers can hide changes.
  • Confusing a domain name with the actual server IP address.