How to Troubleshoot Any DNS Issue Like a Senior Engineer

How to Troubleshoot Any DNS Issue Like a Senior Engineer

DNS troubleshooting starts with knowing what DNS (Domain Name System) does: it turns names like www.google.com into the IP addresses that computers use. When DNS fails, websites and email stop working, so fixing it is one of the first skills an engineer needs.

Last updated: November 2026

Overview & Summary

This guide explains the main DNS record types (A, AAAA, CNAME, NS, SOA, TXT and Alias) and the path a DNS query takes from your browser to the answer. It ends with a troubleshooting table for common problems such as failed migrations, emails landing in spam and slow page loads.

Who is this for?

IT professionals, system administrators, cloud engineers, and anyone preparing for architect-level or senior engineering roles.

Key Concepts & Definitions

TermDefinition
DNS RecordAn entry in the DNS database containing Name, Type, Value, and TTL fields.
TTL (Time To Live)How long (in seconds) a DNS record stays cached. E.g., 3600 = 1 hour.
Root DomainThe invisible . at the end of every domain (e.g., google.com.). Every lookup starts here.
TLDTop Level Domain, such as .com, .org or .net.
Authoritative NSThe server that holds the official DNS records for a domain and gives the final answer.
Recursive ResolverA DNS server (often run by your ISP) that follows the lookup chain for you.
Dual-StackA network that runs IPv4 and IPv6 at the same time.
Negative TTLHow long a “domain doesn’t exist” (NXDOMAIN) response is cached.
SPFSender Policy Framework: a way to authenticate email, set up with a TXT record.
DKIMDomainKeys Identified Mail: a cryptographic signature on email, published in a TXT record.

DNS Record Types, One by One

A Record

Address record: the most basic DNS record

An A record maps a domain name to an IPv4 address. Check it first when a website will not load.

NameTypeValueTTL
www.example.comA203.0.113.63600 (1 hr)

Migration Trap

During a server migration, if the A record still points to the old IP, users keep reaching the old server until the TTL runs out. Update the A record and check its TTL.

AAAA Record

Quad-A record: maps a name to IPv6

An AAAA record maps a domain name to an IPv6 address. It is optional today, but it matters more as IPv6 use grows.

NameTypeValueTTL
www.example.comAAAA2001:db8:1::13600

Dual-Stack Latency

In environments with both IPv4 & IPv6, if an AAAA record exists but the IPv6 path to the server is broken, the client may try IPv6 first, wait for it to fail, then fall back to IPv4. That wait adds noticeable latency. Without an AAAA record, clients just use IPv4. Modern browsers use “Happy Eyeballs” (RFC 8305) to keep this delay short.

Migration Tip

Lower the TTL to 60 seconds before a migration, so the new record reaches users in minutes instead of hours.

CNAME Record

Canonical Name: an alias that forwards

A CNAME points one domain to another domain (not to an IP). It works like a receptionist who sends you to the right floor. In the cloud, CNAMEs are used a lot with CDNs and Load Balancers.

NameTypeValueTTL
www.example.comCNAMElb1.example.net3600
blog.example.comCNAMElb1.example.net3600
api.example.comCNAMElb2.example.net3600

Root Domain Limit

A root domain (e.g., example.com) cannot be a CNAME. Use a subdomain or an Alias record instead.

NS Record

Name Server: hands a domain to its name servers

An NS record names the authoritative name servers for a domain. Root and TLD servers use it to know where to go for the domain’s actual DNS records.

NameTypeValueTTL
example.comNSns1.example.net172800 (48 hrs)

48-Hour Propagation

When you move a domain (e.g., GoDaddy → AWS Route 53), NS record changes can take up to 48 hours to reach resolvers everywhere, because NS records have a high TTL.

SOA Record

Start of Authority: the “constitution” of DNS

The SOA record holds admin details about the DNS zone. It does not route traffic; it only holds information. Think of it as the zone’s constitution: it sets the rules the zone runs by.

Key SOA Fields

FieldExamplePurpose
Primary NSns1.dns.comMain authoritative name server
Admin Email[email protected]Zone administrator contact
Serial Number2023120101Version of the DNS config
Refresh Interval3600How often secondary servers sync
Negative TTL86400Cache duration for “does not exist” responses

Negative TTL Example

If someone looks up nope.example.com and it doesn’t exist, the Negative TTL (e.g., 24 hours) tells resolvers not to ask again during that time.

TXT Record

Text record: ownership and email authentication

TXT records prove that you own a domain and help other mail servers check your email. They say who owns the domain and which servers may send email for it.

Common Uses

SPF (Sender Policy Framework): lists the mail servers that may send email for your domain.

dns
v=spf1 include:_spf.google.com ~all

DKIM: adds a cryptographic signature so others cannot fake email from your domain.

Domain Verification: services like Google Workspace, Slack and Notion ask you to add a TXT record to prove you own the domain.

If emails land in spam

Your SPF or DKIM TXT record is probably wrong. Without correct TXT records, Google and Gmail servers cannot tell that email from your domain is genuine.

Alias Record

A-Alias: gets around the root domain CNAME limit

Root domains (example.com) cannot use CNAME, so DNS providers added the Alias record (Route 53 Alias, Cloudflare CNAME flattening, ANAME). It is a provider feature, not a standard DNS record type. It acts like a CNAME, but the provider resolves it and returns an IP address directly. You need it when you point a root domain at a load balancer.

DNS Resolution Flow

When you type a URL in your browser, the lookup goes through these steps:

diagram
  ┌───────────┐         ┌──────────────────┐         ┌─────────────┐
  │  Browser  │ ──1──►  │ Recursive         │ ──2──►  │   Root      │
  │  (User)   │         │ Resolver (ISP)    │         │   Server .  │
  └───────────┘         └──────────────────┘         └──────┬──────┘
                                │                           │
                           7 ◄──┤   Returns IP              3
                                │   & caches (TTL)          │
                                │                    ┌──────▼──────┐
                                │              4 ◄── │ TLD Server  │
                                │                    │ (.com .org) │
                                │                    └─────────────┘
                         ┌──────▼──────────┐
                     5 ► │ Authoritative    │
                         │ Name Server      │ ──6──► Returns actual IP
                         │ (A/AAAA/CNAME)   │
                         └─────────────────┘

The full path: Browser → Resolver → Root → TLD → Authoritative NS, then the IP is returned and cached.

Step-by-step

  1. You type www.example.com in the browser.

  2. The query goes to the Recursive Resolver (usually your ISP’s DNS).

  3. The resolver asks a Root Server (the hidden . at the end of the domain).

  4. The Root Server points it to the right TLD Server (e.g., .com).

  5. The TLD Server points it to the Authoritative Name Server (set by the NS record).

  6. The Authoritative Server returns the actual IP address.

  7. The resolver caches the result for the TTL and returns it to the browser.

Configuration & Best Practices

Lowering TTL Before a Migration

If you do only one thing before a DNS migration, lower the TTL days before the actual change.

dns
# BEFORE migration — lower TTL to 60 seconds
www.example.com.   60   IN   A   203.0.113.6

# AFTER migration — update IP, then restore TTL
www.example.com.   3600  IN   A   198.51.100.10

SPF TXT Record Setup

dns
example.com.   IN   TXT   "v=spf1 include:_spf.google.com ~all"

# v=spf1         → declares SPF record
# include:...    → authorizes Google's mail servers
# ~all           → soft-fail for unauthorized senders

Key Takeaways

  • Check the A record first: it is the most basic record and the first thing to look at when a website will not load.
  • Lower TTL before any migration: set it to 60 seconds a few days before, so caches expire quickly.
  • CNAME cannot be used on root domains: use an Alias record instead.
  • NS record changes take up to 48 hours: plan domain migrations early.
  • TXT records protect email reputation: if SPF or DKIM is wrong, your emails land in spam.
  • SOA record controls zone transfers: its refresh interval sets how often secondary name servers sync. Public resolvers cache each record for its own TTL.
  • Broken IPv6 adds latency: an AAAA record with an unreachable IPv6 path makes clients wait before they fall back to IPv4.
  • A wrong CNAME fails silently: if it points to the wrong load balancer endpoint, traffic breaks without a clear error.
  • Remember the root dot: every domain ends with ., and knowing this helps when you trace a resolution chain.

Troubleshooting Guide

ProblemLikely CauseFix
Website not foundA record pointing to wrong/old IPUpdate A record; verify TTL expired
Slow page loadsAAAA record exists but the IPv6 path is brokenFix IPv6 routing, or remove the AAAA record until IPv6 works
“Domain not found”CNAME or NS records not updatedVerify CNAME targets; confirm NS points to new provider
Works for some, not othersOld records still cached; TTL too highLower TTL before changes; wait for the old TTL to expire
Emails in spamTXT (SPF/DKIM) misconfiguredAdd proper SPF and DKIM TXT records
Root domain can’t use LBCNAME used on root domainUse Alias (A-Alias) record instead
Changes not propagatingOld TTL still cached; NS delayWait for TTL expiry; NS changes need up to 48h
Service can’t verify domainTXT record missing/incorrectAdd verification TXT record from the service

Recall Questions

Click each question to reveal the answer.

What does an A record do?

It maps a domain name to an IPv4 address. It is the most basic DNS record.

What’s the difference between A and AAAA records?

An A record maps to IPv4; an AAAA record maps to IPv6. AAAA is optional, but it matters more as IPv6 use grows.

Why can’t you use a CNAME on a root domain?

DNS protocol forbids CNAME at the zone apex (root). Use an Alias record instead.

What should you do to TTL before a migration?

Lower it (e.g., to 60 seconds) days before so caches refresh quickly after the IP change.

What is the role of an NS record?

It names the authoritative name servers for a domain, which tells root and TLD servers where to find the domain’s records.

Why might DNS changes take up to 48 hours?

NS records often have a TTL of 172800 seconds (48 hours), so cached entries worldwide take that long to expire.

What does the SOA record’s Negative TTL control?

How long a “domain doesn’t exist” (NXDOMAIN) response is cached, preventing repeated queries for non-existent records.

Emails landing in spam: which record should you check?

The TXT record, and in it the SPF and DKIM settings.

What causes latency in a dual-stack environment?

An AAAA record whose IPv6 path is broken. The client tries IPv6 first, fails, then falls back to IPv4, and that fallback adds noticeable delay. With no AAAA record, the client just uses IPv4.

What analogy describes the SOA record?

The “constitution” of DNS: it sets the admin rules for the zone but doesn’t route traffic.

Mind Map

diagram
DNS Design & Architecture
│
├── DNS Resolution
│   ├── Name → IP Translation
│   ├── Recursive Resolver → Root → TLD → Authoritative Server
│   └── Root Domain (hidden "." at end of every domain)
│
├── Core DNS Records
│   ├── A Record ─────── Domain → IPv4 (most fundamental)
│   ├── AAAA Record ──── Domain → IPv6 (optional, growing)
│   │   └── ⚠ Dual-stack fallback latency risk
│   ├── CNAME Record ─── Domain → Another Domain
│   │   ├── Used with CDNs & Load Balancers
│   │   └── 🚫 Cannot be used on root domains
│   ├── NS Record ────── Delegates to Authoritative Servers
│   │   └── ⏳ Propagation up to 48 hours
│   ├── SOA Record ───── Zone Admin Metadata
│   │   ├── Refresh Interval
│   │   └── Negative TTL
│   ├── TXT Record ───── Ownership & Email Auth
│   │   ├── SPF (email authorization)
│   │   └── DKIM (email signing)
│   └── Alias Record ─── Solves CNAME root limitation
│
├── Key Concept: TTL
│   ├── Controls cache duration
│   ├── Lower before migration (60s)
│   └── High TTL = slow propagation
│
└── Troubleshooting
    ├── Site not found ──── Check A / CNAME / NS
    ├── Latency ─────────── Check AAAA / dual-stack
    ├── Partial propagation ─ Check TTL + caching
    └── Email spam ──────── Check TXT (SPF / DKIM)

Additional References

ResourceDescription
AWS Route 53Amazon’s DNS service with native Alias record support
GoDaddyPopular domain registrar, common in migration scenarios
CDNContent Delivery Network. CNAME records often point to CDN endpoints
nslookupCLI tool to query DNS records
digAdvanced DNS lookup utility (Linux, Mac and Windows)
hostSimple DNS lookup command
whoisDomain registration information lookup

Related guides on infotechtu.com

3 thoughts on “How to Troubleshoot Any DNS Issue Like a Senior Engineer”

  1. Pingback: Types of Servers Explained: A Complete Beginner’s Guide - infotechtu.com

  2. Pingback: Additional Security Services of AWS: KMS, WAF, Inspector & GuardDuty Explained

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top