FoundationNetworking

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

All 336 cloud engineer questions

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