DEV Community

Discussion on: What's DNS?

Collapse
 
gabeguz profile image
Gabriel Guzman

Hi Eugene, exactly. A CNAME is basically a shortcut or an alias to an A record. A CNAME can't point directly to an IP address, it always points to another name.

CNAME:  myhost.duckduckgo.com -> A: www.duckduckgo.com
CNAME:  duckduckgo.com -> A: www.duckduckgo.com 
A: www.duckduckgo.com -> IP: 23.21.193.169', '107.20.240.232', '184.72.104.138

So, you can have any number of CNAMEs that point to any of your A records (or names) but not directly to an IP. A records point a name to an IP.