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.
- 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 owner | Role | What to check from public DNS |
|---|---|---|
shop.example | Flattened apex alias to app.edge.example | Address records available for the intended service |
www.shop.example | Ordinary DNS-only alias to app.edge.example | Visible CNAME to the intended target when not flattened |
_verify.shop.example | Verification alias to a value supplied by the validator | Literal 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
- 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.
- 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.
- 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.
