Canonical: https://weaveos.com/reference/cloudflare/import-dns-zone-file

1. [Software capabilities](https://weaveos.com/reference)
2. /[Cloudflare](https://weaveos.com/reference/cloudflare)
3. /Import DNS records from a BIND zone file

[![](https://weaveos.com/reference/logos/cloudflare.svg)Cloudflare](https://weaveos.com/reference/cloudflare)

# Import DNS records from a BIND zone file

Upload a BIND-format zone file to import DNS records into a Cloudflare zone.

Documentation reviewed November 26, 2026 · 2 methods with sources

## Ways to do it

1. [1API: POST /zones/{zone\_id}/dns\_records/import](https://weaveos.com/reference/cloudflare/import-dns-zone-file#method-1)
2. [2SDK: client.dns.records.import()](https://weaveos.com/reference/cloudflare/import-dns-zone-file#method-2)

API

### POST /zones/{zone\_id}/dns\_records/import

Upload a BIND-format zone file to a Cloudflare zone.

[Read source: Cloudflare API: Import DNS Records](https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/import/)

- Requirements

  A zone ID, an API token with DNS Write when using token auth, and a multipart body containing the file field. The optional proxied field takes a string value of true or false.

- Limitations

  The upload limit is 32 MiB. Cloudflare also limits parsing by the record quota plus a buffer, and caps $GENERATE expansion at 1,000,000 records per import.

SDK

### client.dns.records.import()

Call client.dns.records.import to upload BIND-format content and read the import report.

[Read source: Generated Cloudflare TypeScript DNS method: POST /zones/{zone\_id}/dns\_records/import](https://github.com/cloudflare/cloudflare-typescript/blob/0eb9ef0ea40c1fe38e4b19be92f41bd7466bc1d6/src/resources/dns/api.md#L74)

- Requirements

  An authenticated Cloudflare TypeScript client, zone\_id, and the zone contents in the file string. proxied is an optional string.

- Limitations

  The SDK sends multipart form data. The API’s file size and record expansion limits apply.

[Previous Cloudflare taskApply DNS record changes in a batch](https://weaveos.com/reference/cloudflare/batch-dns-record-changes) [Next Cloudflare task Export DNS records as a BIND zone file](https://weaveos.com/reference/cloudflare/export-dns-records)

## More from Cloudflare

[View all 8 Cloudflare tasks](https://weaveos.com/reference/cloudflare)

- ### [List DNS records in a Cloudflare zone](https://weaveos.com/reference/cloudflare/list-zone-dns-records)

  Use the DNS Records API or Cloudflare TypeScript SDK to retrieve a zone’s records. The DNS Records page lets you inspect a record while working in the dashboard.

  API, SDK, Interface

- ### [Tail Cloudflare Worker logs](https://weaveos.com/reference/cloudflare/tail-worker-logs)

  Use wrangler tail to see incoming Worker requests and errors in your terminal. Use the dashboard’s Live view when you want to inspect the same stream in a browser.

  CLI, Interface

- ### [Find a Cloudflare zone ID](https://weaveos.com/reference/cloudflare/find-zone-id)

  Filter the Zones API by domain name when a script needs the ID. In the dashboard, copy it from the domain’s Overview page.

  API, Interface

- ### [Create a DNS record](https://weaveos.com/reference/cloudflare/create-dns-record)

  Create a record in a zone through the DNS Records API or the Cloudflare TypeScript client.

  API, SDK

## The same task in other apps

- [![](https://weaveos.com/reference/logos/hugging-face.svg)Hugging Face Hub](https://weaveos.com/reference/hugging-face)

  ### [Download a file from a Hugging Face model revision](https://weaveos.com/reference/hugging-face/download-a-model-revision)

  Download a model file with a Hub resolve URL or the hf CLI. Use a full commit hash to pin the same file across builds.

  API, CLI
