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.

All Networking questions Roadmap: Networking for DevOps

More on DNS