- Cloudflare usually calls it CNAME flattening.
- Other providers call it ALIAS, ANAME, or a flattened CNAME.
When to use an ALIAS record
Use ALIAS when you want “point this name at that hostname” behavior but you can’t or shouldn’t use a CNAME. Most commonly:- At the zone apex (
example.com), where standard DNS rules don’t allow a CNAME. - When you’re targeting a hostname whose addresses change — a CDN or a hosted service — but clients need to receive A and AAAA records.
Name and value
Name — the hostname inside the zone you’re creating the record for.- For the zone apex, use
@, the zone-file notation for the zone root. - For a subdomain, use the label:
wwwforwww.example.com.
myapp.hosting-provider.com.
- ALIAS values are hostnames, not IP addresses.
- The target must ultimately resolve to A or AAAA records, directly or through further DNS indirection.
- End the target with a dot. Without one it’s treated as relative to your zone. See Write values.
How it works
ALIAS isn’t a standardized DNS record type that recursive resolvers understand. The authoritative nameserver does the work instead:- A client’s resolver asks for
AorAAAAfor the ALIAS name, for exampleexample.com. - Datum resolves the ALIAS target —
myapp.hosting-provider.com— to its currentAandAAAArecords. - Datum returns those answers as if they’d been configured directly on the ALIAS name.
ALIAS compared with CNAME
Limitations
- Portability. ALIAS and flattening behavior isn’t uniform across providers. If you move DNS elsewhere, you’ll need to translate the record into whatever that provider supports — and a BIND zone file can’t carry it, because
ALIASisn’t a standard type. See Migrate a zone. - Answer types. ALIAS synthesizes A and AAAA answers. It isn’t a general replacement for other record types, and it doesn’t carry the target’s MX, TXT, or other records over to your name.