What Is DNS?

Every time you type a web address into your browser — say, example.com — your device needs to figure out where that website actually lives on the internet. Websites don't live at addresses like "example.com"; they live at numeric IP addresses like 93.184.216.34. DNS, or the Domain Name System, is the technology that bridges the gap between human-readable names and machine-readable numbers.

Think of it like a phone book: instead of memorising everyone's phone number, you look up their name and the book gives you the number. DNS does exactly the same thing for the internet — automatically, in milliseconds, every time you visit a site.

The Key Players in a DNS Lookup

A DNS lookup isn't a single step — it involves several components working together:

  • DNS Resolver: This is usually run by your internet service provider (ISP) or a third-party provider like Google (8.8.8.8) or Cloudflare (1.1.1.1). It's the first stop your request makes after leaving your device.
  • Root Name Servers: There are 13 sets of root name servers worldwide. They don't know the answer to your query, but they know who does — they point your request toward the right top-level domain (TLD) server.
  • TLD Name Servers: These handle top-level domains like .com, .org, or .uk. They direct your query to the correct authoritative name server.
  • Authoritative Name Server: This is the final authority. It holds the actual DNS records for the domain and responds with the IP address you need.

Step-by-Step: What Happens When You Type a URL

  1. You type example.com into your browser and hit Enter.
  2. Your device checks its local DNS cache — if it's visited this site recently, it may already know the IP address.
  3. If not, the request goes to your DNS resolver.
  4. The resolver asks a root name server, which points it to the .com TLD server.
  5. The TLD server points to the authoritative name server for example.com.
  6. The authoritative server returns the IP address.
  7. Your browser connects to that IP address and loads the website.

This entire process typically takes under 100 milliseconds — so fast you never notice it's happening.

Types of DNS Records

DNS isn't just about finding IP addresses. It stores several types of records:

Record TypePurpose
A RecordMaps a domain to an IPv4 address
AAAA RecordMaps a domain to an IPv6 address
MX RecordDirects email to the correct mail server
CNAME RecordCreates an alias from one domain to another
TXT RecordStores text information, often used for verification

Why DNS Matters for Security

DNS is a frequent target for attackers. DNS spoofing (or cache poisoning) tricks your resolver into returning a fake IP address, redirecting you to a malicious site without your knowledge. To counter this, protocols like DNSSEC (DNS Security Extensions) add a layer of cryptographic verification, and DNS over HTTPS (DoH) encrypts your DNS queries to prevent eavesdropping.

Choosing a reputable DNS resolver — such as Cloudflare's 1.1.1.1 or Google's 8.8.8.8 — can improve both speed and security compared to your ISP's default.

Key Takeaway

DNS is one of the internet's most fundamental yet invisible systems. Every click, every search, every page load relies on it. Understanding how it works helps you make smarter choices about your browsing setup — and appreciate just how much engineering goes into something as simple as typing a web address.