CNAME flattening
CNAME flattening speeds up CNAME resolution and allows you to use a CNAME record at your zone apex (example.com).
With CNAME flattening, Cloudflare finds the IP address that a CNAME points to. This process could involve a single lookup or multiple (if your CNAME points to another CNAME). Cloudflare then returns the final IP address instead of a CNAME record, helping DNS queries resolve faster.
For more details on the steps involved in CNAME flattening, review the CNAME flattening diagram and refer to the Cloudflare blog post ↗.
- CNAME flattening happens by default in some cases. Refer to Setup for details.
- CNAME to a different Cloudflare account is prohibited and will result in Error 1014: CNAME Cross-User Banned
-
If a CNAME target is being used to verify a domain for a third-party service, turning on CNAME flattening for all CNAME records may cause the verification to fail since the CNAME record itself will not be returned directly.
- If the final CNAME target has no A/AAAA records (a dangling CNAME), CNAME flattening returns an empty response (NODATA) because there is no IP address to flatten to. This can make it appear as if the DNS record is not propagating. Ensure your CNAME targets resolve to valid A/AAAA records.