Export a DNS Zone
Similar to retrieving a primary zone, you need to provide the UUID of the primary zone that you want to export.
To export an existing primary zone at IONOS Cloud DNS in a BIND format, follow this step:
Perform a GET request providing the zoneId of your primary zone.
Result: On a successful GET request, you receive the BIND file with the primary zone having the UUID assigned.
Request
curl --location --request GET 'https://dns.de-fra.ionos.com/zones/d6ba6fc1-fc82-4f0c-b030-2638778e0bef/zonefile' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
Response
200 Successful operation
;Zone: example.com
;Exported: Sat Jul 22 10:30:18 UTC 2023
$ORIGIN example.com.
$TTL 3600
@ 86400 IN SOA example.com. hostmaster.1und1.com. (
2017060107 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
600 ) ; minimum
@ 86400 IN NS ns-ic.ui-dns.com.
@ 86400 IN NS ns-ic.ui-dns.de.
@ 86400 IN NS ns-ic.ui-dns.org.
@ 86400 IN NS ns-ic.ui-dns.biz.
www 60 IN A 192.0.2.2
www 60 IN AAAA 2001:0db8::1
shop 60 IN CNAME boutique.example.com.
Zone file
The exported zone file is in BIND format, a widely used format supported by most DNS software, including the BIND DNS server.
The file includes all record types associated with the selected primary zone, including SOA record, NS record, Service (SRV) record, and configuration information such as TTL values.
An example of a file in BIND format with an updated SRV record is as follows:
;Zone: example.com
;Exported: Mon Aug 14 09:20:53 UTC 2023
$ORIGIN example.com.
$TTL 3600
@ 86400 IN SOA example.com. hostmaster.1und1.com. (
2017060107 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
600 ) ; minimum
@ 86400 IN NS ns-ic.ui-dns.com.
@ 86400 IN NS ns-ic.ui-dns.de.
@ 86400 IN NS ns-ic.ui-dns.org.
@ 86400 IN NS ns-ic.ui-dns.biz.
www 60 IN A 192.0.2.2
www 60 IN AAAA 2001:0db8::1
shop 60 IN CNAME boutique.example.com.
sub12 60 IN SRV 10 0 5223 server1.example.com.
Last updated
Was this helpful?