DNS is the system that translates names like geeknodes.com into IP addresses that computers understand. It works in the background every time you open a website or send an email. This guide explains, step by step and without unnecessary jargon, what happens during that translation and what the DNS records you’ll see in any domain dashboard are.
In short
- DNS is like a distributed contact list: no one has the whole list, but every server knows whom to ask.
- A query travels resolver → root → TLD → authoritative server, and the answer is stored in cache for as long as the TTL says.
- The most common records are A (IPv4), AAAA (IPv6), CNAME (alias), MX (email) and TXT (text and verifications).
Why DNS is needed
On the internet, every server is identified by an IP address, for example 93.184.215.14 (IPv4) or 2606:2800:21f:cb07:6820:80da:af6b:8b2c (IPv6). Remembering that for every website would be impossible.
DNS (Domain Name System) lets you use easy names and also change a website’s server without you noticing anything: you just update which IP the name points to.
The parts of the system
| Part | What it does | Example |
|---|---|---|
| Client (your device) | Asks for a name | Your browser |
| Recursive resolver | Does all the work of finding the answer | Your ISP’s DNS, 1.1.1.1, 8.8.8.8, 9.9.9.9 |
| Root servers | Know where the servers for each extension are | 13 identities, from a.root-servers.net to m.root-servers.net |
| TLD servers | Know which servers manage each domain in their extension | Those for .com, .es, .org |
| Authoritative server | Has the definitive answer for the domain | Your domain provider’s DNS or Cloudflare’s |
The 13 root servers are actually hundreds of machines spread around the world that share those 13 addresses.
Step by step: what happens when you type an address
Imagine you type www.ejemplo.com into the browser.

- Local cache. The browser and the operating system check whether they already have the IP saved from recently. If they do, that’s it: the site starts loading.
- Ask the resolver. If not, your device asks the configured resolver (usually the one handed out by the router).
- Resolver cache. If someone at your ISP already asked for that name recently, the resolver answers instantly.
- Root server. If it doesn’t know, it asks a root server: “
www.ejemplo.com?”. The root replies: “I don’t know, but these are the.comservers”. - TLD server. The resolver asks a
.comserver, which replies: “The authoritative servers forejemplo.comarens1.proveedor.netandns2.proveedor.net”. - Authoritative server. The resolver asks
ns1.proveedor.net, which gives the final answer: “www.ejemplo.comis93.184.215.14”. - Answer and cache. The resolver returns the IP to you and stores it in cache. So does your device.
- Connection. Now the browser connects to that IP and requests the page.
All of this usually takes milliseconds, and most of the time it’s resolved at step 1 or 3 thanks to caching.
Recursive vs. iterative queries
- Your device makes a recursive query: “give me the final answer, you go find it”.
- The resolver makes iterative queries: it asks each server, which refers it to the next one.
Cache and TTL
Every DNS answer includes a TTL (Time To Live): the number of seconds it can be kept in cache before asking again.

| TTL | Equals | When it’s used |
|---|---|---|
| 300 | 5 minutes | Before a migration, so changes show up quickly |
| 3600 | 1 hour | Typical value |
| 86400 | 1 day | Records that almost never change |
This explains the famous “DNS propagation”: when you change a record, resolvers that already had it cached keep giving the old value until their TTL expires.
Practical tip: if you’re going to change servers, lower the TTL to 300 a day before. That way, after the change, everyone will see the new IP within minutes.
DNS record types
A domain doesn’t have just one “IP”: it has a zone with several records.

| Type | What it’s for | Example value |
|---|---|---|
| A | Name → IPv4 address | 93.184.215.14 |
| AAAA | Name → IPv6 address | 2606:2800:21f:cb07::1 |
| CNAME | Alias for another name | www → ejemplo.com |
| MX | The domain’s mail servers, with priority | 10 mail.ejemplo.com |
| TXT | Free text: SPF, DKIM, verifications | v=spf1 include:_spf.proveedor.com ~all |
| NS | The zone’s authoritative servers | ns1.proveedor.net |
| SOA | Zone data: primary server, serial number, timers | Created by the provider |
| CAA | Which authorities can issue SSL certificates | 0 issue "letsencrypt.org" |
Details worth knowing
- CNAME can’t coexist with other records for the same name. That’s why it’s not usually set on the root domain (
ejemplo.com), which already has NS and SOA. Some providers offer their own alternatives such as “CNAME flattening”. - MX: the number is the priority; the lower the number, the higher the preference. With
10 mail1and20 mail2, mail goes tomail1and usesmail2if it fails. - TXT is where SPF, DKIM and DMARC live, which prevent others from sending forged email on behalf of your domain.
Look up DNS yourself
On Windows, macOS or Linux you have nslookup:
nslookup geeknodes.com
nslookup -type=MX gmail.com
On macOS and Linux, dig gives more detail, including the TTL:
dig geeknodes.com A
dig +short ejemplo.com MX
dig +trace www.ejemplo.com
dig +trace is especially educational: it shows the full path root → TLD → authoritative.
Simplified example of a response:
;; ANSWER SECTION:
ejemplo.com. 3600 IN A 93.184.215.14
It reads like this: name, TTL in seconds, class (IN = internet), type and value.
Flush the local DNS cache
Useful if you’ve just changed a record and your device still sees the old one:
ipconfig /flushdns
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
The first is for Windows; the second, for macOS.
Common problems
| Symptom | Likely cause |
|---|---|
| “Server DNS address could not be found” | The resolver isn’t responding or the domain doesn’t exist |
| A site loads on your phone over cellular but not at home | A problem with the router’s or ISP’s resolver; try another DNS |
| You changed the IP and still see the old site | Cache and TTL. Wait or flush the local cache |
| Email isn’t reaching your domain | MX record misconfigured or missing |
| Your emails go to spam | SPF, DKIM or DMARC missing in TXT |
Frequently asked questions
Does changing DNS speed up the internet?
It doesn’t change the download speed, only how long it takes to resolve names. A fast, reliable resolver makes opening new sites feel slightly snappier.
What is encrypted DNS?
DNS queries normally travel unencrypted. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt them so no one on the network can see which domains you look up.
Can I block ads with DNS?
Yes: your own DNS server can refuse to resolve ad domains. That’s what Pi-hole on a Raspberry Pi does.



