Export DNS zones in BIND format

With this script you can export your Master DNS zones at ClouDNS in BIND format. You can download it from here.


AUTH_ID should be your API user ID AUTH_PASS should be the password of your API user.

ZONES_DIR is the directory, where all DNS zones will be exported (e.g. /home/username/zonefiles)

// Auth ID and Password
define("AUTH_ID", 0);
define("AUTH_PASS", "xxx");
// the directory where the zone files will be stored
define("ZONES_DIR", "/path/to/directory");


When you are ready with your configuration, you can run the script with the following command:

php dns-zone-files-export.php


The script will output a list with exported DNS zones.

Possible problems

If your API user ID or Password are incorrect, you will get an error message.

Cron job

You can add this script to be executed each first day from the month. Example:

0 0 1 * * /usr/bin/php /path/to/php dns-zone-files-export.php >/dev/null

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more