CNAME Flattening at the Domain Apex: What DNS Clients Actually See

Compare apex and subdomain DNS responses. Find out when flattening changes an address lookup or hides a CNAME used for ownership verification.

FBFenwei BianAuthorNov 24, 2026
  • dns
  • cname
  • hosting
  • guide

With CNAME flattening, a DNS provider follows a configured alias and returns address records instead of exposing the alias as an ordinary CNAME. This can serve a website at the zone apex, where an ordinary CNAME conflicts with required zone data. The same change in what clients see can break a separate service that verifies ownership by looking for a literal CNAME. RFC 2181 specifies the CNAME coexistence rule. Cloudflare documents its flattening behavior.

Write down the answer each consumer needs

Suppose a fictional site uses shop.example as its zone apex and app.edge.example as its host’s target. The example also uses a dedicated validation label for a separate service. Decide which public DNS answer you expect before editing the provider dashboard.

Configured ownerRoleWhat to check from public DNS
shop.exampleFlattened apex alias to app.edge.exampleAddress records available for the intended service
www.shop.exampleOrdinary DNS-only alias to app.edge.exampleVisible CNAME to the intended target when not flattened
_verify.shop.exampleVerification alias to a value supplied by the validatorLiteral CNAME if the validator requires it

The provider can show a CNAME-shaped configuration for the apex while clients receive addresses. That difference lets the apex keep records such as NS and SOA. The DNS response proves what the provider serves, not how it labels the editable configuration. An ALIAS or ANAME feature from another provider may have different behavior. Check that provider’s reference before assuming that the same configuration yields the same answer.

Separate a broken target from an unexpectedly flattened verifier

  1. Check which nameservers are authoritative for the owner name. A delegated subdomain can have a different authority than the parent zone. Editing the parent’s copy will not change the answer for that child.
  2. For an apex website, inspect the target’s A and AAAA responses first. Cloudflare notes that flattening a target without address records can yield no address data. Fix the target or change the configured destination before blaming the client’s cache.
  3. For a verification failure, query the verification name for CNAME specifically. If the verification service needs the alias and the provider returns addresses, check whether proxying or a zone-wide flattening toggle is affecting that name. Cloudflare documents both cases and recommends a visible DNS-only CNAME where the verifier requires one. Read Cloudflare’s verification troubleshooting.

Confirm HTTPS separately once DNS works

Even when the apex resolves to usable addresses, the host still must recognize the hostname and serve a certificate for it. Register the custom domain at the host, check the HTTPS response for apex and www, and verify the intended redirect. If DNS returns the expected values and HTTPS still fails, inspect hostname and certificate configuration before changing the alias again.

Sources and further reading

About the author(s)

Software Developer & Writer • Namefi
FBAuthor

Fenwei Bian is a software developer in her thirties who spends her working hours in pull requests and her weekends with her hands in soil or sawdust. Years of open source on GitHub taught her that names are interfaces: a good one is clear, honest about what it does, and kind to whoever has to use it next.

She gardens because it rewards patience and punishes wishful thinking, and she does woodwork because a joint either fits or it doesn't. Both habits show up in how she writes about naming — measure twice, check the source, and don't sand over a rough spot and hope no one notices.

For Namefi she writes about how domain markets actually move, the practical trade-offs of tokenizing and flipping names, and picking a domain you'll still be glad you own in twenty years.

Related guides

Discuss this post

View the discussion on Namefi Discuss