ALIAS vs CNAME vs ANAME

ALIAS, ANAME, and CNAME records all let one name follow another, but they exist because of a single hard limit in DNS: you cannot put a CNAME on a root domain. ALIAS and ANAME are provider-level answers to that problem, each flattening a name-to-name pointer into real address records at the apex. Knowing how they differ keeps your root domain working without breaking email or other records.

The apex CNAME problem

Every zone has an apex (the root domain, example.com with no subdomain), and the apex must always carry an SOA record and NS records. The DNS specification also says a CNAME cannot share a name with any other record. Those two rules collide: because you cannot remove the apex SOA and NS records, you cannot put a CNAME there.

That is a real problem when you want your root domain to point at a managed service that only gives you a hostname. ALIAS and ANAME records exist to solve it.

CNAME

A CNAME record is the standard way to alias one hostname to another. It works perfectly on subdomains:

www.example.com  CNAME  target.provider.com

The resolver receives the target name and looks it up to find the IP. A CNAME is a genuine DNS record understood everywhere, but it must be the only record on its name, which is precisely why it cannot live at the apex.

ALIAS

An ALIAS record is a provider-specific record that gives you CNAME-like behaviour at the apex. To the outside world it is invisible: the nameserver resolves the target hostname itself and answers queries with ordinary A and AAAA records.

example.com  ALIAS  target.provider.com

Because the resolver only ever sees real address records, an ALIAS coexists happily with the apex SOA, NS, and MX records. This flattening is sometimes called CNAME flattening.

ANAME

An ANAME record does essentially the same job as an ALIAS: it points the apex at a hostname and the nameserver resolves that hostname into address records behind the scenes. The name ANAME is simply the term some DNS providers use for this feature, where others call it ALIAS.

Functionally you can treat ANAME and ALIAS as the same thing. The practical takeaway is to use whichever name your DNS provider offers for apex flattening.

At a glance and when to use each

CNAME ALIAS ANAME
Standard DNS record Yes No, provider feature No, provider feature
Works at apex No Yes Yes
What resolvers see A target name Real A or AAAA records Real A or AAAA records
Coexists with MX at apex No Yes Yes

Use a CNAME for subdomains. Use an ALIAS or ANAME at the apex, picking whichever your provider supports. For the underlying difference between name-based and IP-based pointers, see CNAME vs A record.

Never miss a DNS change again.
Start monitoring in minutes.