> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-docs-dns-cli-tabs-and-scriptable-types.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Import and Export

> Import and export DNS records using BIND zone files.

Bunny DNS supports importing and exporting DNS records using the universal BIND zone file format. This lets you migrate between DNS providers or backup your configuration.

## Import records

<Tabs>
  <Tab title="Dashboard">
    To import DNS records from a BIND-compatible zone file:

    1. Go to **DNS** and select your DNS Zone
    2. Click **Import/Export**
    3. Upload your zone file or paste the contents
    4. Review the imported records
    5. Click to confirm the import
  </Tab>

  <Tab title="CLI">
    <Note>
      Don't have the CLI installed? See the [CLI quickstart](/cli/quickstart) to install and authenticate.
    </Note>

    ```bash theme={null}
    bunny dns records import example.com ./zonefile.txt
    ```

    See the [`bunny dns` command reference](/cli/commands/dns) for the full list of commands and flags.
  </Tab>
</Tabs>

### Supported record types for import

| Type  | Supported |
| ----- | --------- |
| A     | Yes       |
| AAAA  | Yes       |
| CNAME | Yes       |
| MX    | Yes       |
| TXT   | Yes       |
| SRV   | Yes       |
| CAA   | Yes       |
| PTR   | Yes       |

<Info>
  Record types not listed above are skipped during import. Bunny-specific
  records (Pull Zone, Redirect, Script) cannot be imported automatically.
</Info>

## Export records

<Tabs>
  <Tab title="Dashboard">
    To export your DNS records to a BIND-compatible zone file:

    1. Go to **DNS** and select your DNS Zone
    2. Click **Import/Export**
    3. Click **Export Zone File**
    4. Save the downloaded file
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    bunny dns records export example.com                   # print to stdout
    bunny dns records export example.com --file ./my.zone  # write to a path
    bunny dns records export example.com --save            # write to ./example.com.zone
    ```
  </Tab>
</Tabs>

### Supported record types for export

| Type  | Supported |
| ----- | --------- |
| A     | Yes       |
| AAAA  | Yes       |
| CNAME | Yes       |
| MX    | Yes       |
| TXT   | Yes       |
| SRV   | Yes       |
| CAA   | Yes       |
| PTR   | Yes       |

<Info>
  Bunny-specific records such as Pull Zone, Redirect, and Script records are not
  included in the export.
</Info>

## Zone file format

The exported BIND file follows the standard format:

```dns theme={null}
;A records
myothersite.example.com.    IN    5m    A    1.1.2.2
maindomain.example.com.     IN    5m    A    1.2.3.4

;MX records
mailexchange.example.com.   IN    5m    MX   0    mxexchange.host.com.

;TXT records
example.com.    IN    1m    TXT    "_acme-challenge.example.com= D-52Wm4V7xoUpGax-F8FrPO45cQRcbRj-XoblaY4uYM"
```
