CNAME vs ALIAS vs ANAME: Pointing Your Root Domain Correctly
You often need to point your root domain (like example.com) at a hostname such as a CDN or load balancer — but a CNAME is not allowed at the root, which is exactly what ALIAS and ANAME records exist to solve. Understanding the three saves a lot of confusion.
CNAME: alias, but not at the apex
A CNAME points one name at another name. It works perfectly for subdomains (www, app), but it cannot be used at the zone apex (the bare root domain) and cannot coexist with other records — see why a CNAME at the apex breaks. Since your apex must hold SOA, NS and often MX records, a CNAME there is simply invalid.
ALIAS and ANAME: apex-safe pointers
ALIAS and ANAME are provider-side record types that achieve what a CNAME would, but at the apex. They point your root at a hostname, and the DNS provider resolves that hostname to its current IPs and answers with A/AAAA records. To the outside world it looks like a normal A record; behind the scenes your provider keeps it in sync with the target.
ALIAS vs ANAME
The two names are largely interchangeable — different providers use different terminology for essentially the same flattening behaviour. What matters is that your DNS host supports one of them. The behaviour: you enter a hostname, and the provider returns the resolved addresses at your apex.
When to use each
- Subdomain to a hostname — a plain CNAME (e.g.
wwwto your platform). - Root domain to a hostname — ALIAS/ANAME if your provider supports it.
- Root domain to a fixed IP — a normal A record, if the target has a stable IP.
If your provider offers neither ALIAS nor ANAME and the target only gives you a hostname, the fallback is to point the apex at a stable IP with an A record — but only if that IP will not change.
Frequently asked questions
Why can't I just use a CNAME on my root domain?
Because the apex must carry SOA and NS records, and a CNAME cannot coexist with other records. The DNS standard forbids it, so providers built ALIAS/ANAME to give the same convenience safely.
Is ALIAS different from ANAME?
Functionally they are the same idea — flattening a hostname to A/AAAA records at the apex. The different names are just provider terminology. Use whichever your DNS host offers.
Does an ALIAS record affect performance?
Minimally — the provider resolves the target and serves normal address records, so clients see a standard A/AAAA answer. The resolution work happens on the provider's side and is generally well cached.
Was this article helpful?