Interview Questions/Phone Screen/DNS A Record vs CNAME
BeginnerPhone
2 min

DNS A Record vs CNAME

DNSNetworkingWeb
Advertisement
Interview Question

What is the difference between an A record and a CNAME record in DNS, and when would you use each?

Key Points to Cover
  • A record maps a name to an IPv4 address
  • CNAME maps a name to another canonical name
  • Use CNAME for aliasing; A for direct address; apex usually requires A/ALIAS
Evaluation Rubric
Defines A record correctly34% weight
Defines CNAME and purpose33% weight
Gives valid usage constraints (apex)33% weight
Hints
  • 💡Some DNS providers offer ALIAS/ANAME for apex CNAME-like behavior.
Common Pitfalls to Avoid
  • ⚠️Confusing the direction of mapping (e.g., an A record maps an IP to a name instead of a name to an IP).
  • ⚠️Failing to mention the critical limitation of CNAMEs at the domain's apex (root domain).
  • ⚠️Not clearly articulating the 'when to use each' aspect with practical examples.
  • ⚠️Omitting the concept of 'ALIAS' or 'ANAME' records as a common solution for apex aliasing where CNAMEs are restricted.
  • ⚠️Providing overly simplistic definitions without explaining the underlying lookup process for CNAMEs.
Potential Follow-up Questions
  • What about AAAA records?
  • How do TTLs impact failover?
Advertisement