How to import/export unix zone file with DNS?

I moved my nameserver for one of my domains from GoDaddy to DigitalOcean, and for the most part it is much better, but I’m missing the import/export zone file feature.

Is there anyway to replicate this on digital ocean?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can go to and click on More... > Download zone right next to your domain, but this has to be done manually.

I’ve not found how to get the zone file from the API, but you can send a request as described here, to get a JSON with all the DNS records:

This is a significant barrier to moving complex DNS records to this server, I would much rather just go to enter my domain and have all of my records imported. Once done I can confidently move forward knowing that no typos or other human errors have been introduced as well as not having to spend hours typing in DNS info.

In my opinion domain DNS import tools suck for all providers. For example. I just tried to import into Cloudflare one on a fairly big zone and it created a whole bunch of records that do not exist.

In think the reason is BIND or or name server data is a bit unstructured and unless your have XFER enabled on the source and destination it would be impossible to guess which records actually exist. And enabling XFER is a security risk / admin feature so forget about easily using it.

So in my opinion I think it’s best just to create all the records or at least apply 100% quality control if you really want to use an import tool.

There is not an import feature for DNS, however this is quite easy to manage. Lets say your domain is <6><^>. As you mentioned you have updated your nameservers for this domain to DigitalOcean.

Your next step will be to navigate to the Networking section within your DigitalOcean account. Here you will see a Domains section with a text filed labeled Enter Domain, enter your domain here and press the button labeled "Add Domain*

Once complete, click on the link for you freshly entered domain. This will open up the Zone File which should have a few NS records entered already for you. Here you will add the various records needed to point to your droplets and/or other services as needed.