A vs CNAME vs ALIAS: Which Record Should Point Your Domain?

Intermediate⏱ 3 min readUpdated October 13, 2026

Your hosting platform says "point your domain at example.netlify.app". For www that is one CNAME record. For example.com itself it is not allowed — and the workaround has three different names depending on your DNS provider. Here is what each option does and which to pick.

Three ways to point a name

RecordValueAllowed atWho follows it
A / AAAAAn IP addressAny name, including the apexNobody needs to: the answer is the address.
CNAMEAnother hostnameAny name except the apex and names with other recordsThe visitor's resolver looks the target up.
ALIAS / ANAME / flatteningAnother hostnameAny name, including the apexYour DNS provider looks it up and answers with addresses.

Why the apex cannot be a CNAME

The domain itself must carry SOA and NS records, and often MX and TXT as well. A CNAME may not share its name with any other record (RFC 1034 §3.6.2), so example.com CNAME … is forbidden by the standard — not by your DNS provider being difficult.

A plain A record works at the apex, but then you must know the platform's addresses and update them if they change. Platforms that publish stable addresses (GitHub Pages, Vercel, Netlify's load balancer) let you do exactly that; others only give you a hostname.

How ALIAS and CNAME flattening work

How ALIAS / CNAME flattening answersA?looks upAVisitorYour DNS providerexample.com ALIASexample.netlify.appCNAME/A203.0.113.80returned as A
The visitor asks for the apex's A record. Your DNS provider looks up the hostname itself and answers with plain addresses, so no CNAME ever leaves it.
  1. You save a record at the apex that points to a hostname, as if it were a CNAME.
  2. When a visitor asks for the apex's A record, your DNS provider looks up the hostname itself.
  3. It answers the visitor with the resulting addresses, as ordinary A/AAAA records.
  4. Nothing outside your provider ever sees a CNAME, so the rule is not broken.
DNS providerWhat it is calledHow you enter it
CloudflareCNAME flatteningCNAME (apex)
Amazon Route 53Alias recordA/AAAA + Alias
Azure DNSAlias record setA/AAAA + Alias
DNSimple · NS1 · DNS Made EasyALIASALIAS
easyDNS · ConstellixANAMEANAME
Bunny DNSFlatten (CNAME)CNAME (apex)

Trade-offs

  • Location. The provider resolves the target from its own servers. A CDN that picks a nearby location from the resolver's address may pick one near the provider instead of near the visitor.
  • Not a standard. ALIAS and ANAME are provider features; the ANAME draft never became an RFC. Moving to another provider means re-creating them by hand, and zone transfers do not carry them.
  • TTL. The provider decides how long the flattened answer is cached, usually the target's TTL.
  • Newer option. An HTTPS record in alias mode (RFC 9460) tells modern browsers where the site lives without breaking the CNAME rule. Support is growing, but older clients ignore it, so keep A/AAAA records too.
; RFC 9460 "alias mode": the apex says where HTTPS really lives
example.com.  3600 IN HTTPS 0 example.netlify.app.

Which one to use

  • Subdomain (`www`, `shop`, `app`) pointing at a platform: CNAME.
  • Apex, platform publishes fixed addresses: A and AAAA with those addresses.
  • Apex, platform gives only a hostname: ALIAS/ANAME or CNAME flattening, if your DNS provider offers it — otherwise move DNS to one that does, or point the apex at addresses and redirect to www.
  • Anything that receives mail or needs TXT records: never a CNAME.

The apex and www together

The most common setup: the apex gets addresses (or an ALIAS), www gets a CNAME, and the host redirects one to the other so there is a single canonical address:

; the apex: addresses, or ALIAS/flattening if your host gives you a name
example.com.      300 IN A      203.0.113.80
example.com.      300 IN AAAA   2001:db8::80
; www: an alias of the platform
www.example.com.  300 IN CNAME  example.netlify.app.
Tip: Pick one canonical form — with or without www — and redirect the other with a permanent (301) redirect. Search engines then see one site instead of two copies.

Frequently asked questions

Is ALIAS the same as CNAME flattening?

They solve the same problem the same way: the provider resolves the target and returns addresses. The name depends on the provider.

Can I use a CNAME for www and an A record for the apex?

Yes, and it is the most common setup. Make sure the host serves both and redirects one to the other.

Does CNAME flattening slow my site down?

Not noticeably. The provider caches the target's answer, and visitors get ordinary A records.

What if my DNS provider has no ALIAS feature?

Use the platform's published IP addresses at the apex if it has them, or move the domain's DNS to a provider that supports flattening.

Try it on your domain

See the theory in practice — run a CNAME Lookup for your own domain.