INTEGRITY Cloudflare Docs

Manage internal zones

Refer to the following sections to learn how to manage your internal DNS zones.

Configuration conditions

When setting up internal zones, observe the following conditions:

1 Logical groupings of internal DNS zones that are referenced by Gateway resolver policies to define how a specific query should be resolved.

Create an internal zone

  1. In the Cloudflare dashboard, go to the Internal DNS page.

    Go to Internal DNS ↗
  2. Select Create an internal zone.

  3. Give your internal zone a name.

  4. Add DNS records to your internal zone using your preferred option:

  • Import a formatted BIND file.
  • Select Add a record and choose Create under the record type you want to add. Refer to DNS record types for details.
  1. Repeat this process for each internal zone you wish to add.
  1. Use the Create Zone endpoint to create an internal zone. Specify your account ID and set the type to internal.

Example

Required API token permissions

At least one of the following token permissions is required:
  • Zone Zone Edit
  • Zone DNS Edit
Create Zone
curl "https://api.cloudflare.com/client/v4/zones" \
	--request POST \
	--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
	--json '{
		"account": {
				"id": "<ACCOUNT_ID>"
		},
		"name": "<ZONE_NAME>",
		"type": "internal"
	}'
  1. Add DNS records to your internal zone using your preferred option:
  1. Repeat this process for each internal zone you wish to add.

Other API actions

The API endpoints to manage internal zones are the same as for managing public zones. The main difference is that the zone type must be set to internal.

Refer to the following API documentation for details: