Course:Internet & Tools/
Lesson

Computers communicate using IP addresses like 172.217.14.206, but humans prefer names like google.com. DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. solves this problem, it's the internet's phonebook. Every time you visit a website, DNS works behind the scenes to translate the name you typed into the address computers understand.

The problem DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. solves

Imagine if you had to remember phone numbers instead of contact names. That's what the internet would be like without DNS:

You type: google.com
Without DNS, you'd need: 172.217.14.206

You type: github.com
Without DNS, you'd need: 140.82.121.4

DNS translates human-friendly domain names into computer-friendly IP addresses automatically. It's one of those technologies that works so well you rarely think about it, until it breaks.

02

How DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. lookup works

When you type example.com in your browser, here's the chain of requests that happen:

Step 1: Browser cache

"Have I visited example.com recently?"

Your browser keeps a small cache of recent DNS lookups. If you visited the site in the last few minutes, the browser uses the cached IP addressWhat is ip address?A numerical label (e.g., 172.217.14.206) that identifies a device on a network - DNS translates domain names into IP addresses., instant load, no network request needed.

Step 2: Operating system cache

If the browser doesn't have it, your operating system (Windows, macOS, Linux) checks its own cache. This cache lasts longer, typically minutes to hours depending on settings.

Step 3: DNS resolver (your ISP)

"Dear DNS server, where is example.com?"

Your computer asks your internet providerWhat is provider?A wrapper component that makes data available to all components nested inside it without passing props manually.'s DNS server (or whichever DNS you've configured, Google, Cloudflare, etc.).

Step 4: Root server

If the resolver doesn't know, it asks one of the 13 root DNS server IPs (actually hundreds of physical servers worldwide). The root server says: "I don't know where example.com is, but here's who handles .com domains."

Step 5: TLDWhat is tld?Top-Level Domain - the last segment of a domain name (.com, .org, .fr), indicating the domain's type or country. server (.com)

"Dear .com server, where is example.com?"

The TLD (Top-Level Domain) server says: "I don't know the IP, but here's the nameserver for example.com."

Step 6: Authoritative nameserver

"What's the IP for example.com?"

Finally! The authoritative server (usually run by your hosting provider or DNS service) responds with the actual IP address: 93.184.216.34

Step 7: Browser connects

Now your browser can connect to 93.184.216.34 and request the webpage. The entire lookup chain usually completes in milliseconds.

03

DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. record types

DNS stores different types of records for different purposes:

RecordPurposeExample
APoints domain to IPv4 addressexample.com → 93.184.216.34
AAAAPoints domain to IPv6 addressexample.com → 2606:2800:...
CNAMEAlias/redirect to another domainwww.example.com → example.com
MXMail server addressexample.com → mail.example.com
TXTText information (verification, SPF)Domain ownership proofs
NSNameserver delegationexample.com → ns1.example.com

Common record combinations

Basic website setup:

example.com     A       93.184.216.34
www.example.com CNAME   example.com

With email:

example.com     A       93.184.216.34
example.com     MX 10   mail.example.com
mail.example.com A      93.184.216.35

Verification (for Google Workspace, etc.):

example.com     TXT     "google-site-verification=abc123"

AI pitfall
AI generally handles DNS concepts fine in conversation, but it can generate incorrect DNS record configurations when you ask it to help set up a domain. Common mistakes include using an A record where a CNAME is needed (pointing to another domain name instead of an IP), setting MX records to IP addresses instead of hostnames, or forgetting to add both the root domain and www subdomain. Always double-check AI-generated DNS configurations against your hosting provider's documentation before applying them.
04

Common DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. servers

You can choose which DNS server to use. Most people use their ISP's default, but you can change it:

ProviderPrimary DNSSecondary DNSFeatures
Google8.8.8.88.8.4.4Fast, reliable
Cloudflare1.1.1.11.0.0.1Privacy-focused, fast
OpenDNS208.67.222.222208.67.220.220Parental controls
Your ISPVariesVariesUsually slowest

Changing to Google or Cloudflare DNS can sometimes speed up browsing and add security features like blocking known malicious domains.

05

DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. caching and propagation

To speed things up, DNS responses are cached at multiple levels:

  1. Browser cache (seconds to minutes)
  2. Operating system cache (minutes to hours)
  3. Router cache (varies by router)
  4. ISP resolver cache (hours to days)
  5. Intermediate resolvers (varies)

This is why DNS changes take time to propagate worldwide. If you change your website's IP addressWhat is ip address?A numerical label (e.g., 172.217.14.206) that identifies a device on a network - DNS translates domain names into IP addresses., some users will see the old IP for hours or even days until all the caches expire.

TTLWhat is ttl?Time-to-Live - a countdown attached to cached data that automatically expires it after a set number of seconds. (Time To Live)

Each DNS record has a TTL value that tells caches how long to store it:

example.com  3600  IN  A  93.184.216.34
             └───┘
             TTL in seconds (1 hour)

Lower TTL = faster updates, but more DNS queries and slower performance
Higher TTL = less load on DNS servers, but slower to update

When you know you're going to change a record soon (like migrating servers), lower the TTL a day in advance. After the change, you can raise it again.

06

Why DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. matters for developers

Deploying websites: You need to configure DNS records to point your domain to your server. Buy a domain, set up A records, add CNAME for www, it's part of going live.

Debugging issues: "Why isn't my site working?" Often it's a DNS issue. Maybe the A record points to the wrong IP. Maybe the CNAME is misconfigured. Maybe DNS hasn't propagated yet.

Performance: DNS lookup adds latencyWhat is latency?The time delay between sending a request and receiving the first byte of the response, usually measured in milliseconds. to the first request to a new domain. If your page loads resources from 10 different domains, that's 10 DNS lookups. This is why some sites use a CDNWhat is cdn?Content Delivery Network - a network of servers around the world that caches your files and serves them from the location closest to the user, making pages load faster. with the same domain.

Security: DNS can be hijacked (redirected to malicious sites). DNSSEC adds cryptographic verification. Cloudflare and other providers offer DNS security features.

07

DNSWhat is dns?The system that translates human-readable domain names like google.com into the numerical IP addresses computers use to find each other. tools

Command line:

# Basic lookup
nslookup example.com

# Detailed info (Linux/Mac)
dig example.com

# See the full lookup chain
dig +trace example.com

# Check specific record type
dig MX example.com

Online tools:

  • whatsmydns.net: Check DNS propagation worldwide
  • dnschecker.org: Test from multiple locations
  • mxtoolbox.com: Comprehensive DNS and email testing

08

Quick reference

TermMeaning
DNSDomain Name System, translates names to IPs
A recordMaps domain to IPv4 address
CNAMEAlias pointing to another domain
MXMail exchange (email server)
TTLTime To Live (cache duration in seconds)
PropagationTime for DNS changes to spread worldwide
Authoritative NSServer with the definitive answer for a domain