# Migrating DNS zones from Yandex 360 to Yandex Cloud DNS

If your domain is delegated to Yandex 360 and your services are hosted in Yandex Cloud, you can transfer domain control to Yandex Cloud DNS servers and migrate DNS zones to Yandex Cloud DNS for more convenience. Yandex Cloud DNS is closely integrated with other Yandex Cloud services (such as [Yandex Compute Cloud](../../dns/concepts/compute-integration.md)).

To migrate DNS zones from Yandex 360 to Yandex Cloud DNS:
1. [Delegate your domain](#domain-delegate).
1. [Transfer records](#yaconnect-records-move).

## Delegate the domain name {#domain-delegate}

Before transferring DNS zones to Yandex Cloud DNS, you need to delegate your domain to Yandex Cloud servers. To do this, specify the addresses of the Yandex Cloud name servers in the `NS` records of your registrar:

* `ns1.yandexcloud.net.`
* `ns2.yandexcloud.net.`

## Transfer records {#yaconnect-records-move}

You can only move your domain's DNS records from Yandex 360 to Yandex Cloud DNS manually.

Before that, create a [public DNS zone](../../dns/operations/zone-create-public.md) for your domain's DNS records.

{% list tabs %}

- A, AAAA, CNAME, NS

  1. [Create a new record](../../dns/operations/resource-record-create.md) of the appropriate type.
  1. In the **Data** field, enter the value of the Yandex 360 record to transfer in the original format.
  1. In the **TTL (in seconds)** field, enter the value of the TTL parameter from Yandex 360.

  For example:

  Yandex 360 | Cloud DNS
  --- | ---
  **Record type**: `CNAME`</br></br>**Record value**: `domain.mail.yandex.net.`</br></br>**TTL**: `600` | **Type**: `CNAME`</br></br>**Data**: `domain.mail.yandex.net.`</br></br>**TTL (in seconds)**: `600`

- MX

  1. [Create a new MX record](../../dns/operations/resource-record-create.md).
  1. In the **Data** field, specify the propeties of the Yandex 360 MX record for transfer in this format: `<priority> <record value>`.
  1. In the **TTL (in seconds)** field, enter the value of the TTL parameter from Yandex 360.

  For example:
  
  Yandex 360 | Cloud DNS
  --- | ---
  **Record type**: `MX`</br></br>**Record value**: `mx.yandex.net.`</br></br>**Priority**: `10`</br></br>**TTL**: `21600` | **Type**: `MX`</br></br>**Data**: `10 mx.yandex.net.`</br></br>**TTL (in seconds)**: `21600`

- TXT
  
  1. [Create a new TXT record](../../dns/operations/resource-record-create.md).
  1. In the **Data** field, specify the properties of the Yandex 360 TXT record for transfer in this format: `"<record_value>"`.

      {% note warning %}

      Cloud DNS uses [MASTER FILES](https://www.ietf.org/rfc/rfc1035.html#section-5) format when parsing TXT records. According to the format specification, `;` marks the beginning of the comment, i.e., all content that comes after it is ignored. To use the `;` character and spaces in the record value, enclose them in double quotes, `""`.

      {% endnote %}

  1. In the **TTL (in seconds)** field, enter the value of the TTL parameter from Yandex 360.

  For example:

  Yandex 360 | Cloud DNS
  --- | ---
  **Record type**: `TXT`</br></br>**Record value**: `v=DMARC1; p=none;`</br>`sp=quarantine; pct=100;`</br>`rua=mailto: dmarcreports@example.com;`</br></br>**TTL**: `26000` | **Type**: `TXT`</br></br>**Data**: `"v=DMARC1; p=none;`</br>`sp=quarantine; pct=100;`</br>`rua=mailto: dmarcreports@example.com;"`</br></br>**TTL (in seconds)**: `26000`

- SRV

  1. Copy all the characters after `SRV` from the Yandex 360 SRV record. For example, copy only `0 5 5060 _sip._tcp.example.com.` from `86400 IN SRV 0 5 5060 _sip._tcp.example.com.`.
  1. [Create a new SRV record](../../dns/operations/resource-record-create.md).
  1. In the **Data** field, enter the characters you copied.
  1. In the **TTL (in seconds)** field, enter the value of the TTL parameter from Yandex 360.

  For example:

  Yandex 360 | Cloud DNS
  --- | ---
  **Record type**: `SRV`</br></br>**Record value**: `86400 IN SRV 0 5 5060 _sip._tcp.example.com.`</br></br>**Priority**: `0`</br></br>**TTL**: `86400` | **Type**: `SRV`</br></br>**Data**: `0 5 5060 _sip._tcp.example.com.`</br></br>**TTL (in seconds)**: `86400`

{% endlist %}

Wait for the changes to take effect. It may take the DNS servers up to 72 hours to exchange data about new DNS records on the internet.

For more information about the types of resource records the service supports, see [this article](../../dns/concepts/resource-record.md).