DNS resolution in partial zones
When you have a partial zone1, Cloudflare handles DNS records a bit differently from full zones in order to internally resolve the origin server where proxied HTTP requests are sent to.
Records within the same zone
When you create a new DNS record in a partial zone, Cloudflare automatically checks whether any of your CNAME
records point to existing A
, AAAA
, or CNAME
records within the same zone.
For example, Cloudflare would show a warning if you had the following records in your partial zone:
sub1.partialzone.com CNAME sub2.partialzone.comsub2.partialzone.com A 192.0.2.1
Since Cloudflare contains both the CNAME
and its target, our DNS resolution will send incoming HTTP requests to sub1.partialzone.com
to the origin 192.0.2.1
.
This can cause issues if you already have DNS records for sub2.partialzone.com
at your authoritative DNS provider. These records may point to 192.0.2.4
, another IP address, or another domain but - because Cloudflare contains the initial record and the target - it never queries your authoritative DNS provider for the record for sub2.partialzone.com
.
sub1.partialzone.com
] --> B[CNAME
record for sub1.partialzone.com
to sub2.partialzone.com
]
subgraph Cloudflare
B --> C[A
record for sub2.partialzone.com
to 192.0.2.1
]
end
C --> D[192.0.2.1
]
subgraph Authoritative DNS
E[A
record for sub2.partialzone.com
to 192.0.2.4
]
endWhen you avoid this situation - meaning you do not have the target of the CNAME
record within your partial zone - this DNS resolution would happen differently.
sub1.partialzone.com
] --> B[CNAME
record for sub1.partialzone.com
to sub2.partialzone.com
]
B --> C[A
record for sub2.partialzone.com
to 192.0.2.4
]
C --> D[192.0.2.4
]
subgraph Cloudflare
B
end
subgraph Authoritative DNS
C
end Records pointing to a partial zone within the same account
You could also create a CNAME
record in a zone (partial or full setup) that points to a record in another partial zone within your account.
In this case, Cloudflare will always resolve the CNAME
target based on the value at your authoritative DNS provider of the partial target zone.
www.alice.com
] --> B[CNAME
record for www.alice.com
to www.partialzone.com
]
B --> C[A
record for www.partialzone.com
to 192.0.2.4
]
C --> D[192.0.2.4
]
subgraph Cloudflare account
subgraph Cloudflare zone 1
B
end
subgraph Cloudflare zone 2
E[A
record for www.partialzone.com
to 203.0.113.1
]
end
end
subgraph Authoritative DNS
C
endA partial (
CNAME
) setup allows you to use Cloudflare’s reverse proxy while maintaining your primary and authoritative DNS provider.Use this option to proxy only individual subdomains through Cloudflare’s global edge network when you cannot change your authoritative DNS provider.
↩︎