DNS Basics

The Domain Name System (DNS) is like the phonebook of the internet. It translates human-readable domain names into IP addresses that computers use to identify each other.

The DNS hierarchy.root.com.org.plexample.comNSexample.orgNS
The root delegates every top-level domain, and each top-level domain delegates the nameservers for a domain.

How DNS Works

When you type a domain name like "example.com" in your browser, your computer needs to find the corresponding IP address. This process involves several steps:

  1. Your computer checks its local DNS cache
  2. If not found, it queries a recursive DNS server
  3. The recursive server queries root servers, then TLD servers, then authoritative servers
  4. The IP address is returned and cached
How a lookup is resolvedClientResolver.root.comNSA93.184.216.341234
A lookup that is not cached asks the root, then the top-level domain, then the domain's own nameservers.

Key DNS Components

  • DNS Resolver - The server that handles your DNS queries
  • Root Servers - The top-level DNS servers that direct queries to TLD servers
  • TLD Servers - Top-level domain servers (.com, .org, .net)
  • Authoritative DNS Servers - The servers that actually contain DNS records

Why DNS Matters

DNS is fundamental to how the internet works. Understanding DNS helps you:

  • Configure your domain's email and website
  • Debug issues with domain resolution
  • Implement security measures like SPF, DKIM, and DMARC
  • Ensure high availability and performance

Frequently asked questions

What is DNS?

DNS (Domain Name System) is the internet's phone book. It translates human-readable domain names like example.com into IP addresses that computers use to identify each other on the network.

How does DNS resolution work?

When you type a domain name, your browser asks a recursive resolver (usually your ISP's) which queries root nameservers, then TLD nameservers, and finally the domain's authoritative nameservers to find the IP address.

What is a DNS record?

A DNS record is an instruction stored in a DNS zone file that maps domain names to IP addresses or other resources. Common types include A, AAAA, MX, TXT, CNAME, NS, and SOA records.

What is DNS TTL?

TTL (Time To Live) is the number of seconds a DNS record is cached by resolvers. A lower TTL means faster propagation of changes; a higher TTL reduces DNS query load.

Try it on your domain

See the theory in practice β€” run a DNS Lookup for your own domain.