Skip to main content
Transfer domains from third-party DNS hosting to Selectel DNS hosting (actual)
Last update:

Transfer domains from third-party DNS hosting to Selectel DNS hosting (actual)

For your information

These are instructions for transferring domains from a third party provider to Selectel (actual) DNS hosting via importing a zone file 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 your data directly without downloading a zone file. See octoDNS documentation for details on supported providers and how to work with them, and Syncing between providers for an example configuration for migration.

  1. Install octoDNS.
  2. Import zone file.
  3. Delegate domain to DNS hosting (actual).

1. Install octoDNS

  1. Install Python 3 and virtualenv:

    sudo apt-get update
    sudo apt-get install python3 virtualenv
  2. Create a directory for octoDNS operation with config and zones folders:

    mkdir -p ~/octodns/{config,zones}
  3. Navigate to the ~/octodns directory:

    cd ~/octodns
  4. Create a virtual environment to work with octoDNS:

    virtualenv env
  5. Activate the virtual environment:

    source env/bin/activate
  6. Install octoDNS in a virtual environment:

    pip3 install octodns
  7. Set Selectel Provider for octoDNS:

    pip3 install octodns_selectel
  8. Check that the Selectel provider has been installed correctly:

    pip3 list | grep octodns-selectel

    The response will show the installed version of the ISP, for example:

    octodns_selectel 0.99.1

    The minimum version of Selectel provider to work with DNS hosting (actual) is 0.99.1.

2. Import zone file

  1. Download the zone file to the ~/octodns/zones directory.

  2. Navigate to the ~/octodns/zones directory:

    cd ~/octodns/zones
  3. Change the name of the downloaded file to your domain name with a dot on the end:

    mv <zone_file.txt> <example.com>.

    Specify:

    • <zone_file.txt> is the name of the zone file you downloaded in step 1;
    • <example.com> is the name of your domain.
  4. Navigate to the ~/octodns/config directory:

    cd ~/octodns/config
  5. Create the import_config.yaml configuration file:

    nano import_config.yaml
  6. Write the configuration for importing a zone to a 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:
    - selectel

    Specify:

    • <token> is your Keystone token for the cloud platform project to which you want to migrate data;
    • <example.com> — name of the domain (zone) to be migrated.
  7. Navigate to the ~/octodns directory:

    cd ~/octodns
  8. Start the import:

    octodns-sync --config-file=./config/import_config.yaml --doit
  9. In Control Panel, go to DNS.

  10. Make sure you are in the project to which you migrated the data. To do this, open the projects menu (name of the current project) and select the desired project.

  11. Verify that the zone appears in the zone list and that its page displays the transferred records.
    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 zone serial number, which changes when the zone is updated and signals to the caching servers that records need to be cached again.

    If the data was migrated incorrectly or incompletely, create a ticket. Domains that only have NS and SOA records will not be migrated.

3. Delegate domain to DNS hosting (actual)

  1. Go to the control panel of the domain registrar where your domain is registered.
  2. 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 listed in a separate entry.