-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[iDNS] Clarify CNAME flattening and reference zones #20891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
RebeccaTamachiro
merged 20 commits into
production
from
rebecca/idns-clarify-cname-reference-zones
Mar 26, 2025
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
55bd61a
Add conditional rendering for create internal zone
RebeccaTamachiro 74b64b4
Clear out unused components from internal-zone-create
RebeccaTamachiro 03d4606
Fix syntax to make conditional property opitional
RebeccaTamachiro 5dff074
Add .yaml file so that iDNS comes up in /products
RebeccaTamachiro 8f82673
Update DNS records link to point to #internal-dns-records
RebeccaTamachiro 647e895
Create and apply partial for reference-zone-intro
RebeccaTamachiro 23d14e9
Add info about CNAME flatenning to iDNS docs
RebeccaTamachiro 9fe349b
Add note about wildcard record and reference zones
RebeccaTamachiro 938dbf6
Revert "Add .yaml file so that iDNS comes up in /products"
RebeccaTamachiro 53bf5dd
Create dedicated pages to reference zones and internal records
RebeccaTamachiro 6f8f186
Descride CNAME flattening behavior with reference zones and view
RebeccaTamachiro bff3dee
Add CNAME flattening example
RebeccaTamachiro 8315bcf
Re-org and further detail reference zones conditions
RebeccaTamachiro 400de45
Remove redundant reference-zone-intro partial
RebeccaTamachiro 876fc8d
Merge branch 'production' into rebecca/idns-clarify-cname-reference-z…
RebeccaTamachiro 5665f25
Fix link to get-started and more specific CNAME h2
RebeccaTamachiro f7569fb
Bring changes from 'production'
RebeccaTamachiro 035d0ae
Add quotes to labels to fix mermaid diagram
RebeccaTamachiro 53807cd
More generic CNAME flattening explanation and adjust example
RebeccaTamachiro 814d7ed
Link to more context around Gateway resolver in iDNS
RebeccaTamachiro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/content/docs/dns/internal-dns/internal-zones/internal-dns-records.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| pcx_content_type: concept | ||
| title: Manage internal DNS records | ||
| sidebar: | ||
| order: 4 | ||
| label: Internal DNS records | ||
| --- | ||
|
|
||
| import { Details, Example } from "~/components"; | ||
|
|
||
| Internal zones can contain the same [DNS record types](/dns/manage-dns-records/reference/dns-record-types/) that Cloudflare supports for public zones. | ||
|
|
||
| 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. | ||
|
|
||
| Refer to [Manage DNS records](/dns/manage-dns-records/how-to/create-dns-records/) or to the [API documentation](/api/resources/dns/subresources/records/) for further guidance. | ||
|
|
||
| ## CNAME flattening in Internal DNS | ||
|
|
||
| With CNAME flattening, Cloudflare finds the final target content that a CNAME points to and then returns this content instead of a CNAME record. With Internal DNS, CNAME flattening is applied by default and cannot be turned off. | ||
|
|
||
| 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. | ||
|
|
||
| <Details header="Example"> | ||
|
|
||
| - Query for the `A` record on `abc.example.local` with view ID 111. | ||
| - Zone 600 references zone 700, which is not linked to any view. | ||
|
|
||
| ```mermaid | ||
| flowchart LR | ||
| accTitle: Internal DNS zones and CNAME flattening example | ||
| accDescr: Diagram exemplifying Internal DNS zones and containing CNAME and A records | ||
|
|
||
| subgraph Internal DNS | ||
| subgraph Zone 700 - net | ||
| A["@ A 192.0.2.10"] | ||
| B["xyz CNAME def.example.local"] | ||
| end | ||
| subgraph View 111 - London | ||
| subgraph Zone 600 - example.local | ||
| X["@ A 192.0.2.1"] | ||
| Y["abc CNAME xyz.net"] | ||
| U["def TXT 15192-51"] | ||
| Z["def A 192.0.2.9"] | ||
| end | ||
| end | ||
| end | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| The record in zone 700 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 corresponding IP address - in this example, `192.0.2.9`. | ||
|
|
||
| </Details> | ||
|
|
||
| If it is not possible to flatten the CNAME record, the following will happen: | ||
|
|
||
| 1. The CNAME record is returned to Gateway resolver as-is. | ||
| 2. Gateway resolver will process the returned record, depending on the **Fallback through public DNS** configuration: | ||
| - On: Gateway will try to resolve the query by sending it to Cloudflare's public DNS resolver ([1.1.1.1](/1.1.1.1/)). | ||
| - Off: Gateway will return the response as-is to the client. | ||
17 changes: 14 additions & 3 deletions
17
src/content/docs/dns/internal-dns/internal-zones/reference-zones.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.