If you point a root domain at a CDN, a load balancer, or one of the cloud services that hands out a hostname instead of a fixed IP address, the DNS rules stop you at the apex. To point a root domain at a hostname, use your DNS provider’s apex aliasing feature (Cloudflare’s CNAME flattening, an ALIAS record, or an ANAME record), which follows the target on the authoritative side and returns ordinary A and AAAA answers to resolvers. Then verify those answers from both the authoritative servers and public resolvers before you trust the change.

The catch is that every provider builds this differently. Supported targets, TTL handling, and zone transfer behavior all vary, and none of these features is a universal DNS standard. PacketTools is built by an engineer with over 28 years in enterprise IT and network engineering, and the same diagnostics used in production are what you will lean on here.
Once you can read a flattened answer, spot a stale cache, and recognize a dangling target, you can move a naked domain onto modern infrastructure without guessing.
Why Can’t a Standard CNAME Record Work at the Zone Apex?

A standard CNAME cannot sit at the zone apex because the apex must hold SOA and NS records, and a CNAME forbids any other data at the same name. Subdomains like www carry no such obligation, so a CNAME works there without conflict.
What Do Apex Domain, Root Domain, and Naked Domain Mean?
These terms all describe the same name: the zone itself, such as example.com, without any label in front. You will also see it called the bare domain. In a zone file it is written as @ or as the fully qualified domain name (FQDN) with a trailing dot, example.com..
“Apex” is relative to the zone you manage. If abc.example.com is delegated as its own zone, then abc.example.com is the apex of that zone. Knowing where your DNS delegation boundaries sit tells you which names carry SOA and NS records.
How SOA and NS Requirements Conflict with CNAME Exclusivity
Every zone apex publishes an SOA record and at least one NS record, and most also publish MX and TXT records. The DNS specification in RFC 1034 is strict about aliases: “If a CNAME RR is present at a node, no other data should be present”.
A CNAME effectively rewrites every record type at that name to the target. Put one at the apex and resolvers would redirect your NS and MX lookups too. ISC BIND 9 refuses to load such a CNAME because it would create a broken zone. If you want a refresher on how the DNS record types interact, the apex is where the exclusivity rule bites hardest.
| Record at apex | Required? | Conflict with CNAME |
|---|---|---|
| SOA | Yes | Direct conflict |
| NS | Yes | Direct conflict |
| MX | If mail is used | Direct conflict |
| TXT (SPF, verification) | Common | Direct conflict |
Why a Standard CNAME Works for www
The www label has no SOA, NS, or MX records of its own. A record such as www.example.com. 3600 IN CNAME site.host.net. is the only data at that name, so the rule holds.
When a recursive resolver receives the CNAME, it chases the target, caches both answers, and returns the final addresses. That is why hosting providers have always been comfortable asking you to CNAME www while giving the apex a harder path.
How Do Providers Turn a Hostname Target into Address Answers?
Providers resolve the hostname target themselves and publish the resulting IP addresses as synthesized A and AAAA records at the apex. The naming differs by vendor, but the visible output to a resolver is ordinary address data.
Following the Target Chain and Synthesizing A and AAAA Answers
With flattening, the authoritative DNS server acts briefly like a resolver. It looks up the target, follows any further CNAMEs, and stops when it reaches address records. Cloudflare describes this as a process that “could involve a single lookup or multiple” before it returns the final IP address.
That internal lookup is a form of DNS recursion, which authoritative servers normally avoid. It adds response time when the cache is cold and makes the apex dependent on the target’s DNS health.
Both address families come through the same chain. If the target publishes AAAA records, the apex returns them; if it publishes only A records, IPv6 clients fall back to IPv4. The IPv4 vs IPv6 split is worth checking separately because one family can break while the other works.
Standard CNAME vs. Flattening vs. ALIAS and ANAME
None of the alias variants is defined by an RFC. An ANAME specification reached IETF draft stage, but providers ship proprietary implementations.
| Approach | Visible to resolvers | Allowed at apex | Standardized |
|---|---|---|---|
| Standard CNAME | CNAME record | No | Yes (RFC 1034) |
| Cloudflare CNAME flattening | A/AAAA | Yes | No |
| ALIAS record (various hosts) | A/AAAA | Yes | No |
| ANAME record (DNS Made Easy and others) | A/AAAA | Yes | No |
Some providers call the result a dynamic A record. Oracle NetSuite uses the label “CNAME Flattening (Dynamic A Record)” in its domain setup documentation.
When Hostname Targets Help with CDNs and Changing Infrastructure
Hostname targets let the platform change IP addresses without touching your zone. CDNs, load balancers, and DDoS protection services rotate or regionalize addresses constantly, and a hardcoded A record goes stale the first time they do.
Flattening also has a load balancing angle. Cloudflare Load Balancing exposes a flatten_cname setting that is on by default for hostname endpoints, and you would turn it off only when clients must resolve each provider’s hostname directly during failover.
How Do You Configure Apex Aliasing with Your DNS Provider?
You configure apex aliasing in your DNS provider’s own record editor, using whatever record type it supports for hostname targets at @. Cloudflare uses a plain CNAME, DNS Made Easy uses ANAME, and cloud-native DNS services tie alias records to their own resources.
Cloudflare: Default Apex Flattening and Optional Record Controls
Cloudflare applies flattening by default for all plans when the apex uses a CNAME. In DNS Records, add a CNAME, set Name to @, enter the target FQDN, choose proxy status and TTL, and save.
If you are migrating, the Cloudflare zone apex documentation states that ANAME or ALIAS records from a previous provider can be recreated as CNAME records.
Paid plans add two controls under DNS Settings:
- Flatten all CNAME records: useful for DNS-only (unproxied) records; set
flatten_all_cnamestotruevia API. - Flatten specific records: edit a record and enable Flatten; Cloudflare adds a
cf-flatten-cnametag in the zone file so exports keep the setting.
Proxied records already return Cloudflare anycast IPs, so they flatten without extra configuration.
DNS Made Easy: Configuring ANAME Targets
DNS Made Easy brands its apex aliasing as the ANAME record. In practice you create an ANAME at the root, enter the target hostname, and the platform returns the target’s addresses.
Before you save, confirm which targets your account supports and how the TTL is presented to resolvers. Check the current DNS Made Easy documentation for those details, since alias behavior is vendor-specific.
Route 53 and Azure DNS: Checking Alias Target Restrictions
Cloud-native DNS services link alias records to resources inside their own platforms. On Azure, an Azure DNS zone can use an alias record set for apex domains to map to Azure Front Door.
Route 53 alias records point to AWS resources such as CloudFront distributions and load balancers. If your target lives outside the provider’s ecosystem, read the current alias documentation before you assume the record will accept it.
Before Saving: Preserve Existing Records and Confirm Service Onboarding
Export the zone first. Your MX, TXT (SPF, DMARC, verification), and CAA records at the apex must survive the change.
Watch for record precedence. On UltraDNS, an existing A record takes precedence over the Apex Alias, and the alias is ignored until you delete it; lowering that A record’s TTL to 30 seconds beforehand shortens the cutover.
Also confirm the hosting platform has your apex domain added on its side. A CDN that has not onboarded the hostname will answer DNS correctly and still serve errors.
How Can You Verify Flattened DNS Answers?
You verify flattening by confirming that the apex returns A and AAAA records matching the target, first from the authoritative nameservers and then from public resolvers. A correct setup never shows a CNAME at the apex.
Use PacketTools DNS Lookup to Inspect Public Address Answers
Run the PacketTools DNS Lookup against your apex for both A and AAAA. You should see address records only.
Then look up the target hostname itself. Its CNAME records and addresses should match what the apex returns. Since PacketTools does not log IPs, queries, or test data, you can check client domains without leaving a trail.
Query Authoritative Nameservers Directly with dig
Ask the authoritative server so no cache gets in the way. With the dig command:
dig NS example.com +shortto find the nameserversdig @ns1.provider.net example.com A +norecursedig @ns1.provider.net example.com AAAA +norecursedig target.cdn.net A +shortto compare
Windows admins can do the same with the nslookup command by passing the nameserver as the second argument. The aa flag in dig’s header confirms an authoritative answer.
Compare Recursive Answers, TTLs, and Target Resolution
Next, query public resolvers like @1.1.1.1 and @8.8.8.8 and compare the address sets. A CDN may return different IPs per resolver, so a mismatch alone is fine.
Read the TTL closely. On UltraDNS, the apex TTL is a placeholder and the target’s TTL is what clients receive, so a 10 second TTL on the final record passes straight through. Other providers apply their own TTL policy, which you confirm by watching the counter decrease across queries.
Use PacketTools DNS Propagation Checker to Compare Resolver Views
The DNS propagation checker queries many resolvers at once. You want every location to return A records, with no CNAME at the apex and no empty answers.
Geographic variation in IPs is expected with anycast or geo-routed CDNs. An empty response from some locations points to cached negative answers or a target that fails in certain regions.
What Can Go Wrong After Flattening Is Enabled?
Most failures after flattening fall into five groups: stale caches, empty answers, failed verifications, unexpected CDN routing, and certificate or migration problems. Each leaves a distinct fingerprint in the DNS answers.
Stale Answers: Provider Refresh Intervals and Recursive Caching
Two caches stack on top of each other. The provider caches the target’s addresses, and recursive resolvers cache the flattened apex answer.
If the platform changes IPs, you wait for both to expire. Lower the TTL before planned changes and recheck from several resolvers. A general DNS troubleshooting workflow helps separate a cache problem from a configuration one.
Missing Answers: Dangling Targets, Loops, and NODATA
When the final target has no address records, Cloudflare returns an empty NODATA response that looks like a propagation delay. Query the target directly; if it returns nothing, the problem is upstream of you.
Loops show up when two names point at each other. Clients may then report a DNS lookup failure even though your zone file looks tidy. Also on Cloudflare, a CNAME pointing to a different Cloudflare account triggers Error 1014: CNAME Cross-User Banned.
Failed Domain Verification When a Service Expects a Visible CNAME
Some SaaS platforms verify ownership by looking for a CNAME. A flattened record hides that CNAME, so verification fails.
On Cloudflare, avoid enabling “flatten all CNAME records” for verification or DKIM selector records. Leave those unflattened so the CNAME stays visible.
CDN Routing and Resolution Time: Why Results Vary
The provider’s resolver location shapes which CDN node your apex points to. UltraDNS answers based on the client IP only when the recursive server passes it via EDNS0 Client Subnet; otherwise it uses the resolver’s own IP.
The first lookup after cache expiry also costs extra resolution time while the provider chases the target. Repeated queries come back faster.
Proxy Behavior, TLS Validation, and DNS Provider Migration
A proxied Cloudflare record returns Cloudflare IPs, so the certificate visitors see comes from Cloudflare. A DNS-only record sends traffic straight to the target, which must hold a certificate covering your apex. Test with curl –resolve against a specific IP to isolate TLS from DNS.
Migrations need extra care. UltraDNS states that Apex Alias records do not transfer to secondary providers via AXFR, so multi-provider setups need primary-primary configuration with the alias recreated on each.
Choose Supported Apex Aliasing and Verify the Answers
Use your DNS provider’s documented apex aliasing feature, then confirm the result from the authoritative servers outward. A standard CNAME breaks the apex because SOA and NS records must live there. Flattening, an alias record, or an ANAME record solves that by returning synthesized A and AAAA answers.
Treat each implementation as vendor-specific. Before you cut over, check these points against current documentation:
- Supported target types and any same-platform restrictions
- How TTLs are passed to resolvers
- Zone transfer and secondary DNS behavior
- Whether verification records must stay as visible CNAMEs
After saving, query authoritative DNS with +norecurse, compare public resolvers, and confirm the target itself resolves. If the apex returns addresses that match the target across locations, your configuration is working.

Leave a Reply