How DNS Works in 2026: The Resolution Chain, 8 Record Types and the dig Commands That Debug It
How DNS works, in one pass: your resolver asks a root server for the TLD's nameservers, asks those for the domain's authoritative nameservers, then asks those for the record itself, caching every answer for its TTL. Just 13 root server identities, served from more than 1,500 anycast instances, anchor that chain.
- There is no propagation. Nothing pushes your change anywhere. Old answers simply expire, and the TTL you set earlier decides when.
- Four parties, not one. Stub resolver, recursive resolver, root and TLD servers, authoritative nameserver. The fault sits in exactly one of them.
- Read the TTL column in dig output. If it counts down between two identical queries, you are talking to a cache, not to your zone.
- TTL is a cost lever. Going from 3,600 to 60 seconds multiplies refresh queries about 60 times, and Route 53 charges USD 0.40 per million standard queries for the first billion monthly.
- One empty record is enough. AWS's post-event summary for 20 October 2025 traces a multi-hour us-east-1 failure to an empty DNS record for one regional endpoint.
Your API worked from the office all morning. At 9 PM a colleague on home broadband says the new endpoint is dead, you curl it from your laptop and it answers instantly, and monitoring is entirely green. That gap, where two machines ask the same question and get two different answers, is almost always DNS. It feels unpredictable because people learn DNS as a diagram instead of as a cache with an expiry clock.
How DNS Works: The Full Resolution Chain
A hostname like api.example.com is not stored anywhere as a single fact. It is assembled from a chain of delegations, each owned by a different party, and the only reason the internet is not permanently on fire is that almost every step of the DNS resolution process is cached.
The DNS resolution process, participant by participant
Your application calls getaddrinfo(), which hands the question to the stub resolver in your operating system. The stub knows almost nothing and forwards the question to a recursive resolver, usually your ISP's or a public one such as 1.1.1.1. That resolver does the real work: it asks a root server which nameservers serve .com, asks one of those which nameservers serve example.com, and asks one of those for the A record. Each reply is cached for the number of seconds it carries as its TTL.
The resolution chain for api.example.com
The recursive resolver does all the asking. Your laptop asks one question and waits.
Chain and root server counts per ICANN's RSSAC FAQ, checked 26 November 2026.
Two details matter more than the picture. Steps 2 and 3 almost never happen, because a busy resolver already holds .com's nameservers for days and example.com's for hours, so a real lookup is usually one question or none. And nothing in the chain ever pushes anything: the resolver pulls, and it only pulls again when its copy expires.
Four numbers worth knowing by heart
These explain most of the odd behaviour you will meet in a packet capture.
Root count per ICANN RSSAC; 1,232 bytes is the DNS Flag Day 2020 recommendation, and ISC's knowledge base records BIND 9.18 shipping it as the default. Checked 26 November 2026.
Recursive vs Authoritative DNS Server: Who Does What
The recursive vs authoritative DNS server split is the distinction that unblocks everything else. A recursive resolver answers any question for its clients by doing the legwork and caching the result. An authoritative server answers only for the zones it has been given, and never goes asking on your behalf. You can see the difference in one flag: a recursive reply carries ra, for recursion available, while an authoritative reply carries aa, and its TTL is the zone's configured value rather than whatever is left on a cached copy.
So when somebody says a record is wrong, the only useful first question is which of the two you are talking to. Right at the authoritative server and wrong at a public resolver means you have a caching problem, and your job is to wait out a TTL you can measure. Wrong at the authoritative server means no amount of waiting will help.
DNS Records Explained: The 8 Types You Will Actually Touch
There are dozens of record types. DNS records explained usefully means eight of them, because those are the ones you will realistically edit in four years of platform work, and each has a gotcha that costs people an afternoon.
| Record | What it holds | Where you meet it | The gotcha |
|---|---|---|---|
| A | One IPv4 address | Pointing a hostname at a load balancer | Several A records give round robin, not failover. |
| AAAA | One IPv6 address | Dual-stack services and mobile networks | A stale AAAA is worse than none: clients prefer IPv6. |
| CNAME | An alias to another name | Pointing www or api at a managed endpoint |
Illegal at the zone apex. Use your provider's alias or ANAME instead. |
| MX | Mail server names plus priority | Email for the domain | Priority is lowest-wins. An MX pointing at a CNAME is invalid. |
| TXT | Arbitrary text strings | SPF, DKIM, DMARC | One SPF policy per name. Two valid SPF records make both fail. |
| NS | The nameservers for a zone | Delegating a zone or a subdomain | The set at your registrar and the set inside the zone must match. |
| SOA | Zone serial and timers | Checking a change shipped | Its minimum field is the negative-caching TTL, so typos get cached too. |
| CAA | Which CAs may issue certificates | Hardening TLS issuance | Set it wrong and your next renewal fails silently, in 60 days. |
The apex rule catches everyone once. You own example.com, you want it to serve what www.example.com serves, and your provider refuses the CNAME. The reason is structural: the apex already has to hold NS and SOA, and a CNAME is defined to be the only record at its name. Managed providers paper over it with a synthetic record, which is what a Route 53 alias is, and which is why apex aliases turn up on the SAA-C03 syllabus.
Also read: What Is Load Balancing? How It Works, 6 Algorithms and Load Balancer vs Reverse Proxy in 2026, which picks up where the A record stops.
TTL: The Number That Decides Your Failover Speed and Your Bill
Picture a two-person platform team at a mid-size Indian insurer moving a claims API from an on-premises load balancer to an AWS Network Load Balancer. They change the A record at 2 AM sharp and then watch half their traffic keep landing on the old box for an hour. Nothing is broken. The TTL was 3,600 seconds, so a resolver that fetched the record at 1:59 AM may serve the old address until 2:59 AM.
So the arithmetic runs backwards from the cutover. If the current TTL is T, lower it at least T seconds before the change, because every cached copy has to expire once at the old value before the short value is in play. For a 3,600-second TTL, that means dropping to 60 a full hour ahead, realistically the evening before.
Short TTLs are not free, which is where the trade-off bites. Take a zone refreshed by roughly 50,000 distinct resolvers. At 3,600 seconds that is about 24 refreshes each per day, near 36 million queries a month, and Amazon's Route 53 pricing page lists standard queries at USD 0.40 per million for the first billion each month, so around USD 14. Hold a 60-second TTL permanently and the same zone produces about 2.16 billion queries a month, which is USD 400 for the first billion alone.
My rule, and I will commit to it: 300 seconds for records in front of user traffic, 60 only inside a planned change window, a day or more for NS and MX. The common advice to run everything at 60 seconds for agility buys you a few minutes of recovery you will use twice a year, and charges you for it daily.
dig Command Examples: Proving How DNS Works, Step by Step
If you learn one DNS skill this month, make it reading dig output. The four dig command examples below cover nearly every real incident.
# 1. The plain question your application is asking
dig +short api.example.com A
# 2. Walk the chain yourself: root, then .com, then the authoritative NS
dig +trace api.example.com A
# 3. Ask one named resolver instead of whatever DHCP handed you
dig @1.1.1.1 api.example.com A
# 4. Ask the authoritative server directly, with recursion turned off
dig @ns-1234.awsdns-56.org api.example.com A +norecurse
Command 4 settles arguments. It bypasses every cache between you and the source of truth, and the aa flag in the reply proves you reached an authoritative server rather than a forwarder pretending to be one.
Now the part nobody teaches. Run the same query twice, a few seconds apart, and watch the middle column.
$ dig @8.8.8.8 api.example.com A | grep -A2 'ANSWER SECTION'
;; ANSWER SECTION:
api.example.com. 274 IN A 203.0.113.17
$ dig @8.8.8.8 api.example.com A | grep -A2 'ANSWER SECTION'
;; ANSWER SECTION:
api.example.com. 268 IN A 203.0.113.17
That number fell from 274 to 268, so this resolver is counting down a cached copy with 268 seconds left. You are not looking at your zone; you are looking at a snapshot of it. If the value is wrong, you now know exactly how long until that resolver asks again, and you can stop refreshing the browser.
| What you see in dig | What it means | What to do next |
|---|---|---|
NOERROR, empty answer section |
The name exists but has no record of that type | Query the right type. A missing AAAA looks exactly like this. |
NXDOMAIN |
The name does not exist in the zone at all | Check for a trailing-dot mistake in the provider UI, and that the SOA serial moved. |
SERVFAIL |
The resolver could not obtain a valid answer | Retry with +cd to skip DNSSEC validation. If that works, signing is broken, not your records. |
;; Truncated, retrying in TCP mode |
The reply exceeded the advertised UDP buffer | Confirm TCP port 53 is reachable. UDP-only rules break large answers. |
No ra flag in the reply |
That server will not recurse for you | Expected from an authoritative server. Point the query at a resolver instead. |
What Usually Goes Wrong in DNS, and Why
Four failures account for most of the DNS tickets I have watched teams work through, and none of them is exotic.
The four that actually happen
Each has a symptom you can recognise in under a minute.
"It has not propagated yet"
There is no propagation step to wait for. The old answer sits in caches until its TTL expires, and that TTL is a number you chose. One dig at a public resolver tells you the exact wait.
A CNAME where it cannot live
An apex CNAME, or an MX pointing at a CNAME. Some providers accept the entry and quietly break mail instead of refusing it. Symptom: the website works, email stops.
Record designSplit-horizon surprise
Resolves in the office, fails from home. A private zone answers one audience and a public zone the other, and usually the private zone is attached to the wrong network.
Resolution scopeDelegation that drifted
The NS set at the registrar no longer matches the nameservers holding the zone, often after a half-finished migration. Resolvers follow the registrar, so your edits land in a zone nobody reads.
DelegationPatterns drawn from documented provider behaviour and public incident write-ups, reviewed 26 November 2026.
- DNSSEC is the most oversold thing in DNS for learners. Worth understanding, poor as a first project. APNIC's measurements around the October 2026 root key rollover put India's resolver-side validation in the mid to high fifties as a percentage of users, while the share of domains carrying a signed delegation has stayed in single digits globally.
- The failure mode is brutal. A missing A record breaks one hostname. A botched key rollover makes validating resolvers refuse your entire zone, which reads as total disappearance rather than a bug. Automate the rollover or do not sign at all.
Case Study: One Empty DNS Record, Fifteen Hours of AWS
AWS's own post-event summary for 20 October 2025 attributes the us-east-1 event to a latent race condition in the DNS management system behind DynamoDB, which left an incorrect, empty DNS record for the regional endpoint dynamodb.us-east-1.amazonaws.com, and the automation that should have repaired that record could not. AWS's timeline puts the start at 11:48 PM PDT on 19 October, the DNS fault diagnosed by 12:26 AM, mitigation at 2:24 AM, and the end of customer impact at 2:20 PM the next day. The failure then spread into EC2 and the Network Load Balancer service.
Read that as an engineer rather than as news. The database was fine and the capacity was fine. The name simply resolved to nothing, and because every client in the region reached the service by that name, "nothing" travelled into every dependent system faster than a runbook could follow. The lesson scales down to those two engineers at the insurer: monitoring must tell an empty answer apart from a stale one, DNS changes get the same review as code, and anything writing records automatically needs a guard that refuses to write an empty one.
Where DNS Shows Up in Cloud, Data and AI Work
Private endpoints that resolve to the wrong address
You enable a private endpoint, your application still reaches the public IP, and the firewall drops it. Nine times out of ten the private DNS zone was created but never linked to the virtual network, so the hostname keeps resolving publicly. It is the most common first-week failure on Azure AI endpoints, which is why connectivity sits early in the Azure AI and generative AI developer track.
Gateways and lakehouse connectivity
An on-premises data gateway that cannot resolve an internal SQL hostname fails with a credentials-looking error that has nothing to do with credentials, a classic in Power BI and PL-300 work. It repeats with private connectivity to a lakehouse, and a live Microsoft Fabric data engineering program spends lab time on it because the error text never says "DNS".
Agents, tools and anything with a hostname
Every RAG service and AI agent you ship reaches its vector store, model endpoint and tools by name, and an agent that retries a failed tool call will happily hammer a dead hostname a hundred times. Put an MCP server behind a real domain with TLS and the CAA and apex rules above stop being trivia; that wiring is built live in 360DT's CCDV-F developer prep course.
Customer environments you do not control
A Forward Deployed Engineer walks into networks where split-horizon DNS, forced forwarders and internal-only CAs are the default, and the first hour on site goes on proving which resolver the customer's hosts actually use. Our live AWS Solutions Architect and DevOps course covers the Route 53 half of that, private hosted zones and alias records included, with the wider credential map in the full certifications overview.
Also read: How OAuth 2.0 Works: The Authorization Code Flow, PKCE and Token Validation Explained for 2026 and AWS Roadmap 2026: How to Learn AWS in 14 Weeks With Free-Tier Labs and Real Commands.
Learn Route 53, VPC resolution and private zones the way incidents teach them
A live weekend program that prepares you for both AWS Solutions Architect Associate (SAA-C03) and AWS DevOps Engineer Professional (DOP-C02). It includes hands-on projects, mentor support and placement guidance, with the next batch in January 2027.
Explore the course
In your position I would not try to learn all of DNS. I would spend one evening running the four dig commands above against a domain I own, lower a TTL and watch it count down, and write down what my registrar's NS set says. That is roughly two hours, and it is the difference between guessing and knowing at 2 AM. When you want the cloud side of it taught live, with Route 53 and VPC resolution done as labs rather than slides, sit in on a free 360DT webinar first and then take the AWS Solutions Architect and DevOps course.
Related guides
- What Is Observability? How Logs, Metrics and Traces Actually Work in 2026 because the next question after "is it DNS" is how you would have seen it in your traces.
- Terraform vs Ansible in 2026: 12 Criteria, Real Pricing and Which One to Learn First for DevOps Jobs in India for putting zones and records under version control.
- Linux Commands Cheat Sheet for DevOps in 2026: 50 Commands With Worked Examples if the dig output above was new terminal territory.
- Site Reliability Engineer Salary in India 2026: Advertised Pay by Experience, Company Type and the Real SRE Premium for what this skill is worth on a CV.
- Cloud Engineer Jobs in Mumbai 2026: Pay Bands, the Data Centre Shift and Who Is Hiring to see which employers hire for exactly this stack.
Frequently asked questions
How does DNS work step by step?
Your operating system's stub resolver sends the hostname to a recursive resolver. That resolver asks a root server which nameservers serve the top-level domain, asks those which serve your domain, then asks those for the record, caching every reply for its TTL. In practice the first two steps come from cache.
What is the difference between a recursive and an authoritative DNS server?
A recursive resolver answers any question for its clients by doing the lookups itself and caching the results. An authoritative server holds the zone data and answers only for its own domains. The reply flags tell them apart: ra is recursion available, aa is authoritative answer.
How long does DNS propagation actually take?
There is no propagation, because nothing is pushed to other servers. Resolvers serve the previous answer until their cached copy expires, so the worst-case wait equals the TTL in effect when they last looked the record up. A 3,600-second TTL means an hour; 300 means five minutes.
Why is understanding how DNS works important for cloud engineers in India?
Because most cloud connectivity failures present as something else. Private endpoints, VPC peering, gateways and managed load balancers are all reached by name, so a private zone linked to the wrong network shows up as a timeout or a permissions error. Route 53 and VPC resolution are also examinable on the AWS Solutions Architect Associate syllabus.
What does SERVFAIL mean in dig output?
It means the resolver could not produce a valid answer, which is not the same as the name not existing. Usual causes: a DNSSEC validation failure, unreachable authoritative nameservers, or a broken delegation. Re-run with +cd to disable validation. If that succeeds, signing is your problem, not your records.
Can I use a CNAME record at the root of my domain?
No. The apex must hold SOA and NS records, and a CNAME is defined to be the only record at its own name, so the two cannot coexist. Managed providers work around it with a synthetic record such as a Route 53 alias or an ANAME.
What is a good TTL value for an A record?
300 seconds suits records in front of user traffic. Drop to 60 only inside a planned change window, and lower it a full old-TTL period before the cutover so long-lived cached copies expire first. Keep NS and MX at a day or more.
Is DNSSEC worth enabling for a small business domain?
Usually not as your first move. Resolver-side validation is now common, but signed domains remain a minority, and a mishandled key rollover makes validating resolvers reject your whole zone rather than one record. Turn it on if your provider fully automates signing and rollovers; otherwise fix TTL discipline first.
About this guide. 360 Digital Transformation is an Anthropic Partner and a Microsoft Authorized Training Partner. Other certification bodies, vendors and employers named here are not affiliated with us. Tools and versions change quickly; commands and figures cited were checked on 26 November 2026.


