Transfer domains from a third-party DNS hosting to Selectel DNS hosting (actual)
This is an instruction for transferring domains from a third-party provider to Selectel DNS hosting (actual) by importing a zone file using OctoDNS.
If your current DNS hosting does not provide the ability to download the zone file, but is supported in OctoDNS, you can transfer the data directly, without downloading the zone file. For more information about supported providers and working with them, see OctoDNS documentation, an example configuration for migration in the section Syncing between providers.
1. Install OctoDNS
-
Install Python 3, virtualenv and pip3:
Linux
macOS
sudo apt-get update
sudo apt-get install python3 virtualenv
sudo apt-get install python3-pipbrew install python3
brew install virtualenv -
Create a directory for working with OctoDNS with folders
config
andzones
:mkdir -p ~/octodns/{config,zones}
-
Go to the '~/octodns` directory:
cd ~/octodns
-
Create a virtual environment for working with OctoDNS:
virtualenv env
-
Activate the virtual environment:
source env/bin/activate
-
Install OctoDNS in a virtual environment:
pip3 install octodns
-
Install Selectel provider for OctoDNS:
pip3 install octodns_selectel
-
Check that the Selectel provider is installed correctly:
pip3 list | grep octodns-selectel
The installed version of the provider will appear in the response, for example:
octodns_selectel 0.99.1
The minimum version of the Selectel provider for working with DNS hosting (actual) is 0.99.1.
2. Import the zone file
-
Download the zone file to the directory `~/octodns/zones'.
-
Go to the
~/octodns/zones
directory: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 >
is the name of the zone file that you downloaded in step 1;<example.com >
is the name of your domain.
-
Go to the
~/octodns/config
directory:cd ~/octodns/config
-
Create the configuration file
import_config.yaml
:nano import_config.yaml
-
Write the configuration for importing the zone to the file:
---
processors:
no-root-ns:
class: octodns.processor.filter.IgnoreRootNsFilter
providers:
selectel:
class: octodns_selectel.SelectelProvider
token: <token>
zonefile:
class: octodns_bind.ZoneFileSource
directory: ./zones
check_origin: false
zones:
<example.com>.:
sources:
- zonefile
processors:
- no-root-ns
targets:
- selectelSpecify:
<token>
— your Keystone token for the project to which you want to transfer the data;<example.com >
is the name of the domain (zone) to be migrated.
-
Go to the '~/octodns` directory:
cd ~/octodns
-
Start the import:
octodns-sync --config-file=./config/import_config.yaml --doit
-
In the [control panel](https://my.selectel.ru/dns /) go to DNS → Domain Zones.
-
Make sure that you are in the project where you transferred the data. To do this, open the projects menu (the name of the current project) and select the desired project.
-
Make sure that the zone appears in the list of zones, and the transferred records are displayed on its page.
Resource records of the same type are displayed as a group of records.
NS and SOA resource records are not migrated, they will be automatically created in DNS hosting (actual) with default values:- 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 records need to be cached again.
If the data was transferred incorrectly or not completely, create a ticket. Domains that have only NS and SOA records will not be migrated.
- NS —
3. Delegate the domain to DNS hosting (actual)
- Go to the control panel of the domain registrar where your domain is registered.
- In NS records, replace the values with NS DNS hosting servers (actual):
a.ns.selectel.ru
,b.ns.selectel.ru
,c.ns.selectel.ru
,d.ns.selectel.ru
. Each server must be specified in a separate entry. - Wait until the migrated resource records are distributed to the DNS servers. Distribution can take up to 72 hours.
- Optional: check resource records. If after 72 hours the resource records have not appeared on reputable DNS hosting servers:
a.ns.selectel.ru
,b.ns.selectel.ru
,c.ns.selectel.ru
,d.ns.selectel.ru
, create a ticket.