What is the difference between an A record and a CNAME record in DNS, and when would you use each?
- 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
- 💡Some DNS providers offer ALIAS/ANAME for apex CNAME-like behavior.
- ⚠️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.
- ❓What about AAAA records?
- ❓How do TTLs impact failover?
Ready to prove your AWS networking knowledge?
Practice with free Advanced Networking Specialty (ANS-C01) exam questions. Instant answers and detailed explanations — no account required.
Start free practice quizQuestions that share similar topics with this one
How DNS Resolution Works
IntermediateDNS Propagation Basics
BeginnerPurpose of a CDN
BeginnerDNS Resolution Failure
IntermediateClients Using Stale DNS Cache
IntermediateDeepen your knowledge with these related blog posts
Paginated vs. Bulk API Calls: Performance, Cost, and Reliability Trade‑offs
Should you fetch many results at once or smaller batches at a time? A practical guide to the CPU, memory, network, and cloud-cost trade‑offs of paginated vs. one-shot API calls—with actionable rules of thumb.
EKS Cluster Upgrades: A Production Runbook for Platform Teams
A comprehensive guide to safely upgrading Amazon EKS clusters at scale. Covers pre-flight checks, control plane upgrades, add-on versioning, node group strategies, rollback procedures, common anti-patterns, and fleet automation.