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

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.