CNAME flattening lets Cloudflare resolve a CNAME target and return its final address, including at the zone apex. This allows a root domain to use a service that supplies a hostname instead of a fixed IP.
IN THIS ARTICLE
Information to have ready
Obtain the exact target from the destination service and confirm that it accepts your custom domain. Save current apex A/AAAA records and any related verification requirements.
01 Check CNAME flattening and public DNS answers
- Open DNS > Records and review the intended apex record.
- Configure the supported apex CNAME with the supplied hostname, resolving conflicting address records deliberately. Select proxy status according to the destination’s requirements.
- Check the public address response. At the apex, a flattened answer can return A or AAAA values rather than expose the CNAME you entered.
- Verify the destination application recognises your domain and has appropriate certificate coverage. DNS alone does not register a custom domain with that application.
- Review optional flattening settings before applying them to additional records, especially third-party verification CNAMEs.
Confirm the expected result
The root domain should reach the intended service and return valid DNS answers. Confirm both the application response and TLS, not only a successful address lookup.
Troubleshoot unexpected results
A verification provider may expect to see a literal CNAME and fail if an optional setting flattens that record. Keep verification hostnames DNS only and preserve their required record behaviour. Do not hardcode a transient address merely because a flattened lookup returned it once.
Is flattening the same as a browser redirect?
No. It changes DNS resolution. The visitor’s requested hostname remains the original domain unless an HTTP redirect separately changes the URL.