Import a DNS Zone

You can import a DNS zone from your existing DNS provider to IONOS Cloud.

Prerequisite: You need an IONOS Cloud account with API credentials configured with the appropriate permissions.

To import an existing zone to IONOS Cloud DNS, follow these steps:

  1. Create a DNS zone without records.

  2. Perform a PUT request providing the zoneId of the newly created zone and the zone file.

Result: On a successful PUT request, the records provided in the zone file will be added to your DNS zone.

Important: If the zone file you import contains CNAME entries that point to names in another private zone, Azure DNS resolution of the CNAME will fail unless the other private zone is imported or the CNAME entries are modified.

Request

curl --location --request PUT 'https://dns.de-fra.ionos.com/zones/42b21ce3-6fc7-44af-b0c9-2aaadbf2b333/zonefile' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
--data-raw '$ORIGIN example.com.
www 60  IN  A   1.2.3.4
shop    60  IN  CNAME   app.example.com.'

Response

200 Successful operation

{
  "id": "42b21ce3-6fc7-44af-b0c9-2aaadbf2b333",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "d6ba6fc1-fc82-4f0c-b030-2638778e0bef",
      "type": "record",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "lastModifiedDate": "2023-08-14T15:52:53.000Z",
        "createdDate": "2022-08-21T15:52:53.000Z",
        "state": "PROVISIONING",
        "fqdn": "app.example.com",
        "zoneId": "a363f30c-4c0c-4552-9a07-298d87f219bf"
      },
      "properties": {
        "name": "app",
        "type": "A",
        "content": "192.0.2.2",
        "ttl": 3600,
        "priority": 0,
        "enabled": true
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "http://PREVIOUS-PAGE-URI",
    "self": "http://THIS-PAGE-URI",
    "next": "http://NEXT-PAGE-URI"
  }
}

Zone file

The imported file has to be in BIND format, a widely used format supported by most DNS software, including the popular BIND DNS server.

The file should include all the record types associated with the selected zone. The Start of Authority (SOA) and Name Server (NS) records are not to be considered since IONOS Cloud uses its name server configuration.

Last updated

Revision created

commented latest release