Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud DNS
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Getting started
  • Create a private DNS zone
  • Add resource records to the internal zone
  • Test the availability of domain names in the internal zone
  • Create a public DNS zone
  • Add resource records to the public zone
  • Test the availability of domain names in the public zone

Getting started with Cloud DNS

Written by
Yandex Cloud
Updated at March 7, 2025
  • Getting started
  • Create a private DNS zone
    • Add resource records to the internal zone
    • Test the availability of domain names in the internal zone
  • Create a public DNS zone
    • Add resource records to the public zone
    • Test the availability of domain names in the public zone

Create DNS zones, add to them A records for your test VMs, and test the domain names for availability.

Getting startedGetting started

  1. Log in or sign up to the management console. If not signed up yet, navigate to the management console and follow the on-screen instructions.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and its status is ACTIVE or TRIAL_ACTIVE. If you do not have a billing account yet, create one.
  3. If you do not have a folder yet, create one. While creating a folder, you can also create a default virtual network with subnets in all availability zones.
  4. Create a network and subnets to connect your test VMs.
  5. Create VMs named test-vm-1 and test-vm-2 in the ru-central1-a availability zone. Make sure test-vm-1 has a public IP address. Connect them to subnets of the same network.

Create a private DNS zoneCreate a private DNS zone

Domain zones store resource records.

Create a new domain zone:

Management console
CLI
  1. Open the Cloud DNS section of the folder where you need to create a DNS zone.
  2. Click Create zone.
  3. Specify the zone settings:
    1. Zone: testing.
    2. Type: Internal.
    3. Name: test-zone.
    4. Networks: Network where your VMs reside.
  4. Click Create.

Run this command:

yc dns zone create --name test-zone \
--zone testing. \
--private-visibility network-ids=<network_ID>

Where --private-visibility is the ID of the network with your test VMs.

Add resource records to the internal zoneAdd resource records to the internal zone

Management console
CLI
  1. Open the list of zones and select test-zone.
  2. Select Records in the menu on the left.
  3. Click Create record. Specify the record parameters:
    1. Name: test-vm-1.
    2. Type: A.
    3. TTL (in seconds): 600.
    4. Data: test-vm1 internal IP address.
  4. Click Create.
  5. Click Create record once again. Set the parameters for another record:
    1. Name: test-vm-2.
    2. Type: A.
    3. TTL (in seconds): 600.
    4. Data: test-vm2 internal IP address.
    5. Click Create.

Run the following commands:

yc dns zone add-records --name test-zone \
--record "test-vm-1 600 A <VM_internal_IP_address>"

Where --record is the record containing the test-vm-1 internal IP address.

yc dns zone add-records --name test-zone \
--record "test-vm-2 600 A <VM_internal_IP_address>"

Where --record is the record containing the test-vm-2 internal IP address.

Test the availability of domain names in the internal zoneTest the availability of domain names in the internal zone

Connect to test-vm-1 via SSH:

ssh <VM_public_IP_address>

On your VM, try accessing test-vm-2 using its domain name:

host test-vm-2.testing.

Make sure that the IP address of the appropriate VM is returned in response:

host test-vm-2.testing.
test-vm-2.testing has address 10.0.0.9

Create a public DNS zoneCreate a public DNS zone

If you have a registered domain name, you can create a public domain zone and add a record to it. In this example, we will use example.com as the domain name.

Create a new public domain zone:

Management console
CLI
  1. Open the Cloud DNS section of the folder where you need to create a DNS zone.
  2. Click Create zone.
  3. Specify the zone settings:
    1. Zone: example.com..
    2. Type: Public.
    3. Name: test-public-zone.
  4. Click Create.

Run this command:

yc dns zone create --name test-public-zone \
--zone example.com. \
--public-visibility

Add resource records to the public zoneAdd resource records to the public zone

Management console
CLI
  1. Open the list of zones and select test-public-zone.
  2. Select Records in the menu on the left.
  3. Click Create record. Specify the record parameters:
    1. Name: www.
    2. Type: A.
    3. TTL (in seconds): 600.
    4. Data: test-vm-1 public IP address.
  4. Click Create.

Run this command:

yc dns zone add-records --name test-public-zone \
--record "www 600 A <VM_public_IP_address>"

Where --record is the record containing the test-vm-1 public IP address.

Delegate your domain name by specifying the addresses of the Yandex Cloud ns1.yandexcloud.net. and ns2.yandexcloud.net. name servers at your registrar.

Test the availability of domain names in the public zoneTest the availability of domain names in the public zone

Make sure that the created record points to the VM's public IP address. Run the following command on your computer:

host www.example.com ns1.yandexcloud.net.

Result:

Using domain server:
Name: ns1.yandexcloud.net.
Address: 84.201.185.208#53
Aliases:

www.example.com has address <test-vm-1_public_IP_address>

Was the article helpful?

Next
All guides
Yandex project
© 2025 Yandex.Cloud LLC