On this page
An A record maps a hostname to an IPv4 address. An AAAA record maps the same kind of name to an IPv6 address. A CNAME is an alias that points one name at another name, not at an IP, and it is not an HTTP redirect. You use these three records to tell the internet where your site lives after you point DNS at your host.
After a move, the ticket we see most often is a leftover AAAA. You updated the A record to the new server, but dual-stack devices still prefer IPv6 and hit the old box. That can look like DNS never propagated. Align the A and AAAA records with the new host, or remove the AAAA if the new host does not offer IPv6 yet.
What each record is for
Use an A record when you want a name such as example.com or www.example.com to resolve to a specific IPv4 address. Use an AAAA record the same way for IPv6. Use a CNAME when one hostname should simply follow another hostname, for example pointing www at the apex name. A CNAME must be the only data on that node; classic DNS does not allow it next to an A, AAAA, MX, or TXT on the same name. The zone apex usually cannot be a CNAME either. Some DNS hosts offer flattening or ALIAS-style features that synthesize addresses behind the scenes. That is a product feature, not a standard record you paste into a generic zone editor.
www can be a CNAME; the apex usually cannot
Pointing www at the apex with a CNAME is normal when the apex itself has A and/or AAAA records. Pointing the naked domain at www with a CNAME is where mail and SPF often break, because that node is then only allowed to be a CNAME. If the public site is on www, keep the apex as A and AAAA and CNAME www to it, or use intentional flattening from your DNS host. Do not leave an AAAA on a host you no longer control.
Do not stack a CNAME and an A on one name
Migration tools sometimes write both a CNAME and an A for the same hostname. Some resolvers follow the CNAME and ignore the A. Others refuse to answer cleanly. You can end up on different sites depending on which recursive resolver answered. Pick one story for that name and delete the other.
Check the zone with dig, not only with ping
Ping only tests ICMP to an address you already believe. It will not show a leftover AAAA. Ask DNS for all three record types:
dig example.com A +short
dig example.com AAAA +short
dig www.example.com CNAME +shortThen ask the same questions at the authoritative nameserver and at a public resolver. If your zone is on our nameservers, you can query @ns1.logicweb.com. When ns1 is already correct and a public resolver is not, you are waiting out TTL. When ns1 is still wrong, the change may have been made in the old registrar’s parking zone instead of the live zone.
Keep A and AAAA pointed at the host you actually use, and use CNAME only where an alias is the whole story for that name. That keeps phones, mail, and AutoSSL from following stale or conflicting answers.
Tagged
Was this article helpful?
Be the first to rate this article.



