How does DNS resolution actually work, and what is the difference between an A record and a CNAME?
What they are really testing: Beyond "DNS maps names to IPs": do you understand the recursive lookup chain, record types, and TTL caching. DNS is behind a huge share of real outages.
A real interview question
How does DNS resolution actually work, and what is the difference between an A record and a CNAME?
What most people say
drag me
“DNS maps a domain name to an IP address so you do not have to remember numbers.”
True but shallow. It never explains the recursive chain, record types, or TTL, so it cannot help when DNS is the cause of an incident, which is common.
The follow-ups they ask next
You changed a DNS record but some users still hit the old server. Why?
Caching by TTL: resolvers and clients keep the old answer until it expires. Lower the TTL ahead of a planned change so propagation is quick.
Why can you put a CNAME on www but not on the root/apex of a domain?
A CNAME cannot coexist with other records, and the apex needs records like NS/SOA. Providers solve it with ALIAS/ANAME or Route 53 alias records that behave like a CNAME at the apex.
What the interviewer is listening for
- Describes the recursive root/TLD/authoritative walk
- A vs CNAME (address vs alias)
- Knows TTL drives caching/propagation
What sinks the answer
- Only "names to IPs"
- Confuses A and CNAME
- Unaware of TTL and propagation delay
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“A resolver walks [root, then TLD, then the authoritative nameserver] if nothing is cached. An A record [maps a name to an IPv4 address]; a CNAME [aliases one name to another name]. Every record has a [TTL that resolvers cache by], so before a change I [lower the TTL] so it propagates quickly.”
Keep going with networking
Foundation
What is a VPC, and what is a subnet within it? Why split a network into subnets at all?
Foundation
What is the difference between TCP and UDP, and when would you choose each?
Foundation
What happens, step by step, when you type a URL into a browser and press enter?
Foundation
What is the difference between IPv4 and IPv6, and why does IPv6 exist?
Junior
An EC2 instance in a private subnet needs to download OS updates from the internet. Walk me through how you make that work, and why.
Junior
In AWS, what is the difference between a security group and a network ACL, and when would you reach for each?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free