01 What is DNS?
DNS (Domain Name System) is the phonebook of the internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses.
DNS translates domain names to IP addresses so browsers can load Internet resources. Without DNS, you would have to type 142.250.190.46 every time you wanted to visit Google.
The Domain
The human-readable address (e.g., example.com)
DNS Server
The translator that looks up the IP
The Server
The machine located at 93.184.216.34
02 How It Works
When you type a URL, a 4-step lookup process happens instantly:
1. Recursive Resolver
Your ISP's server receives the query. It checks if it already knows the IP. If not, it asks the Root Server.
2. Root Nameserver
The root server directs the resolver to the TLD Server (Top Level Domain) specific to .com, .org, etc.
3. TLD Nameserver
The TLD server directs the resolver to the Authoritative Nameserver (the specific server hosting the domain's records).
4. Authoritative Nameserver
This server holds the actual IP address. It returns it to the resolver, which gives it to your browser.
03 Common DNS Records
Different "records" control different things:
A Record
Points a domain (example.com) to an IPv4 address (192.0.2.1). The most basic and essential record.
MX Record
Mail Exchange. Tells the internet where to deliver emails sent to @example.com.
TXT Record
Text. Used for verification (e.g., Google Search Console) and security (SPF/DKIM for email).
CNAME Record
Canonical Name. Maps one domain to another (e.g., www.example.com -> example.com).
04 DNS Security
DNS was not originally built with security in mind. This makes it vulnerable to attacks:
DNS Spoofing (Cache Poisoning)
Attackers inject corrupt DNS data into a resolver's cache, causing users to be redirected to a malicious site without realizing it.
DDoS Attacks
Attackers flood DNS servers with queries, knocking them offline. If your DNS is down, your website is down, even if the web server is fine.
05 Frequently Asked Questions
Why does it take up to 48 hours for DNS changes to propagate?
DNS records are cached by ISPs worldwide to speed up loading. When you change a record, you have to wait for those caches to expire (based on the TTL or Time To Live).
What is a Nameserver?
A nameserver is a specialized server that holds your DNS records. It tells the rest of the internet where to find your website, email, and other services.
Can DNS affect my website speed?
Yes! A slow DNS provider adds latency before your website even starts loading. Switching to a faster DNS provider (like Cloudflare or AWS Route 53) can improve TTFB (Time to First Byte).
What is DNSSEC?
DNSSEC adds a layer of cryptographic security to DNS lookups, preventing attackers from hijacking traffic by spoofing DNS responses.