Skip to content

Commit bff3dee

Browse files
Add CNAME flattening example
1 parent 6f8f186 commit bff3dee

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/content/docs/dns/internal-dns/internal-zones/internal-dns-records.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar:
66
label: Internal DNS records
77
---
88

9+
import { Details, Example } from "~/components";
10+
911
Internal zones can contain the same [DNS record types](/dns/manage-dns-records/reference/dns-record-types/) that Cloudflare supports for public zones.
1012

1113
You can manage internal DNS records in the same way as you would manage public DNS records, with the difference that [proxy status](/dns/proxy-status/) does not apply to internal DNS records.
@@ -18,6 +20,36 @@ With CNAME flattening, Cloudflare finds the IP address that a CNAME points to an
1820

1921
Cloudflare will try to flatten the CNAME record considering both the specified [DNS view](/dns/internal-dns/dns-views/) and any existing [reference zones](/dns/internal-dns/internal-zones/reference-zones/). If the reference zone then has another CNAME, the record will again be considered from the perspective of the original view.
2022

23+
<Details header="Example">
24+
25+
- Query for `abc.example.local` with view ID 111.
26+
- Zone 600 references zone 700, which does not belong to any view.
27+
28+
```mermaid
29+
flowchart LR
30+
accTitle: Internal DNS zones and CNAME flattening example
31+
accDescr: Diagram exemplifying Internal DNS zones and containing CNAME and A records
32+
subgraph Internal DNS
33+
subgraph Zone 700 - net
34+
A[@ A 192.0.2.10]
35+
B[xyz CNAME def.example.local]
36+
end
37+
subgraph View 111 - London
38+
subgraph Zone 600 - example.local
39+
X[@ A 192.0.2.1]
40+
Y[abc CNAME xyz.net]
41+
Z[def A 192.0.2.9]
42+
end
43+
end
44+
end
45+
```
46+
47+
After finding the CNAME record that points to `xyz.net`, Cloudflare cannot resolve it within zone 600. However, since this zone is referencing zone 700, this will be considered in the resolution.
48+
49+
The record in zone 700 then points to `def.example.local`, which Cloudflare will then try to resolve in the original view. As an `A` record can be found for `def.example.local`, Cloudflare will return the IP address `192.0.2.9`.
50+
51+
</Details>
52+
2153
If it is not possible to flatten the CNAME record, the following will happen:
2254

2355
1. The CNAME record is returned to Gateway resolver as-is.

0 commit comments

Comments
 (0)