How CNAME flattening works
CNAME flattening, Cloudflare returns an IP address instead of the target hostname that a
CNAME record points to.
This process supports a few features and delivers better performance and flexibility, as mentioned in the .
Consider the diagram below to have an overview of the steps that may be involved in
Example use case
domain.testis a zone on Cloudflare and has the following
external-origin.testis a zone on a different DNS provider and has the following A record:
In this case, the process to respond to queries for
domain.test directly with the IP address can be represented by the following diagram:
Aspects to consider
- If the
CNAMErecord is proxied in Cloudflare, the answer is made up of multiple and its Time to Live (TTL) is set to
- If the
CNAMErecord in Cloudflare is not proxied, the flattened answer consists of the IP address from the external DNS provider and its TTL corresponds to the lower value between the external record and the Cloudflare