Transfer domains from third-party DNS hosting to Selectel DNS hosting
This is a guide for migrating domains from a third-party provider to Selectel DNS hosting (actual) via zone file import using octoDNS.
If your current DNS hosting does not provide the ability to download a zone file, but is supported in octoDNS, you can migrate data directly, without downloading the zone file. Learn more about supported providers and working with them in the octoDNS documentation, and find a migration configuration example in the section Syncing between providers.
1. Install octoDNS
-
Install Python 3, virtualenv, and pip3:
Linux
macOS
sudo apt-get updatesudo apt-get install python3 virtualenvsudo apt-get install python3-pip -
Create a directory for working with octoDNS with the
configandzonesfolders:mkdir -p ~/octodns/{config,zones} -
Go to the
~/octodnsdirectory:cd ~/octodns -
Create a virtual environment for working with octoDNS:
virtualenv env -
Activate the virtual environment:
source env/bin/activate -
Install octoDNS in the virtual environment:
pip3 install octodns -
Install the Selectel provider for octoDNS:
pip3 install octodns_selectel -
Check that the Selectel provider is installed correctly:
pip3 list | grep octodns-selectelThe output will show the installed provider version, for example:
octodns_selectel 0.99.1The minimum version of the Selectel provider required to work with DNS hosting (actual) is 0.99.1.
2. Import the zone file
-
Download the zone file to the
~/octodns/zonesdirectory. -
Go to the
~/octodns/zonesdirectory:cd ~/octodns/zones -
Change the name of the downloaded file to your domain name with a dot at the end:
mv <zone_file.txt> <example.com>.Specify:
<zone_file.txt>— the name of the zone file you downloaded in step 1;<example.com>— your domain name.
-
Go to the
~/octodns/configdirectory:cd ~/octodns/config -
Create the
import_config.yamlconfiguration file:nano import_config.yaml -
Write the zone import configuration to the file:
---processors:no-root-ns:class: octodns.processor.filter.IgnoreRootNsFilterproviders:selectel:class: octodns_selectel.SelectelProvidertoken: <x_auth_token>zonefile:class: octodns_bind.ZoneFileSourcedirectory: ./zonescheck_origin: falsezones:<example.com>.:sources:- zonefileprocessors:- no-root-nstargets:- selectelSpecify:
<x_auth_token>— IAM token for the project to which you want to transfer data;<example.com>— name of the domain (zone) you want to transfer.
-
Go to the
~/octodnsdirectory:cd ~/octodns -
Run the import:
octodns-sync --config-file=./config/import_config.yaml --doit -
In the Control panel, in the top menu, click Products and select DNS hosting.
-
Make sure you are in the project where you transferred the data. To do this, open the project menu (the name of the current project) and select the desired project.
-
Make sure the zone appears in the list of zones and that the transferred records are displayed on its page.
Resource records of the same type are displayed as a record set.
NS and SOA resource records are not transferred; they will be automatically created in DNS hosting (actual) with default values that cannot be edited:- NS —
a.ns.selectel.ru.,b.ns.selectel.ru.,c.ns.selectel.ru.,d.ns.selectel.ru. - SOA —
a.ns.selectel.ru. support.selectel.ru.<zone_serial_number> 10800 3600 604800 60, where<zone_serial_number>is the serial number of the zone, which changes when the zone is updated and signals caching servers that the records need to be cached again.
If the data was transferred incorrectly or incompletely, create a ticket. Domains that only have NS and SOA records will not be transferred.
- NS —
3. Delegate the domain to DNS hosting (actual)
- Go to the control panel of the domain registrar where your domain is registered.
- In the NS records, replace the values with the DNS hosting (actual) NS servers:
a.ns.selectel.ru,b.ns.selectel.ru,c.ns.selectel.ru,d.ns.selectel.ru. Each server must be specified in a separate record. - Wait for the transferred resource records to propagate to the DNS servers. Propagation can take up to 72 hours.
- Optional: check the resource records. If after 72 hours the resource records have not appeared on the authoritative DNS hosting servers:
a.ns.selectel.ru,b.ns.selectel.ru,c.ns.selectel.ru,d.ns.selectel.ru, create a ticket.