Reference zones
Last updated Jul 16, 2026 During an internal DNS query resolution, if no internal record is found within a matching internal zone, Cloudflare will check if the matching internal zone is referencing another internal zone. Successive references can be followed with a maximum of five references in a chain.
Note
A wildcard record (*.example.local) in the matching internal zone will take precedence over an exact match in a reference zone.
Configuration conditions
- Each internal zone can only reference one other zone.
- The same zone can be referenced by multiple internal zones.
- Public zones cannot be used as reference zones.
- Reference zones do not have to be linked to the same DNS view as the zone referencing them. They may also not be linked to any view at all.
Set up
- In the Cloudflare dashboard, go to the Internal DNS page. Go to Internal DNS ↗
- Select a zone.
- Within the selected zone, go to Reference zone.
- Select Add reference zone. If your zone already has a reference zone set up, you must first remove it. As explained in the configuration conditions, each internal zone can only reference one other zone at a time.
- Find the zone you want to use as reference and choose Select in the respective row.
Use the Update DNS settings endpoint. In --json, specify the internal_dns object with the parameter reference_zone_id.
Note
If your API token is scoped to specific zones, make sure it includes both the zone you are updating and the zone you are referencing.
In the following example, internal zone A (ID 8a904aeb565c42cfa207d98f6edea2f3) is referencing internal zone B (ID 8e64c6fb4b514f3faf64de81efc11e51).
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>Zone DNS Settings Write</code>
- <code>DNS Write</code>
</details>
Update DNS Settingsbash
curl "https://api.cloudflare.com/client/v4/zones/8a904aeb565c42cfa207d98f6edea2f3/dns_settings" \
--request PATCH \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"internal_dns": {
"reference_zone_id": "8e64c6fb4b514f3faf64de81efc11e51"
}
}'
A third zone (C) could also point to zone B as a reference, but zone A cannot add another zone as a reference while also having zone B configured as its reference zone.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/internal-dns/internal-zones/reference-zones/#page","headline":"Reference zones","description":"Learn about reference zones. Cloudflare Internal DNS allows zones to reference others for query resolution when no direct record is found.","url":"https://developers.cloudflare.com/dns/internal-dns/internal-zones/reference-zones/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/internal-dns/internal-zones/reference-zones/og.png?v=5d7a13183ad3c595","dateModified":"2026-07-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Private networks"]}
description: Understand how to set up and manage internal DNS zones with Cloudflare. Explore configuration conditions, zone creation, and available API endpoints. title: Manage internal zones image: https://developers.cloudflare.com/dns/internal-dns/internal-zones/setup/og.png?v=1c0e1d42c85cca59
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.
Docs