What is the difference between A and CNAME records?
BeginnerConceptDNS
Answer
An A record maps a name directly to an IPv4 address. A CNAME maps a name to another name, and the resolver follows the chain to eventually find an A/AAAA. CNAMEs are good for pointing www or app at a load balancer DNS name whose IPs change.
Avoid long CNAME chains: each hop is an extra lookup and they cannot be mixed with other record types at the same name.
More on DNS
What does DNS do and what happens when you type a URL into a browser?BeginnerWhat are the common DNS record types?BeginnerWhat is the difference between a recursive resolver and an authoritative server?IntermediateExplain the DNS resolution chain step by step with dig.IntermediateWhat is TTL in DNS and how does it affect changes?BeginnerWhat is negative caching in DNS?Intermediate