Private DNS: Quick start
To configure DNS in a private network of the cloud platform, you create a private DNS zone with records. You can also:
- add a network to a private DNS zone — if a network is added to a DNS zone, adding or changing a port in this network automatically creates or updates an A or AAAA record for it. The fully qualified domain name (FQDN) of a port in a record is generated as
<server_hostname>.<zone_domain_name>., where<server_hostname>is the server hostname,<zone_domain_name>is the zone domain. You can change the port domain name manually, and the record in the zone will be updated automatically; - connect a network to a private DNS resolver — if a network is connected to a DNS resolver, servers in this network can resolve domain names of all private DNS zones within their pool and project.
If you need to configure DNS in a private network of dedicated servers, the connection is made via a global router, see the Configure DNS in a private network of a dedicated server guide for details.
To configure private DNS in a cloud platform network:
-
In the Control panel, from the top menu, click Products and select Cloud Servers.
-
Follow the Private DNS section.
-
On the DNS zones tab, click Create DNS zone.
-
Select the pool where the private network is located.
-
Enter the zone domain. The domain can contain numbers, Latin letters, and hyphens. The domain cannot be a top-level domain, for example
example. -
Optional: enter the TTL in seconds or leave the default value. TTL is the time during which resource records for a zone in the NS server cache are considered up to date and do not need to be re-cached. The zone TTL will apply to records for which no separate TTL is specified.
-
Optional: select the network you want to add to the zone. If you add a network to a zone, A or AAAA records will be automatically created and updated for ports in that network. You can add a network to a zone at any time.
-
Optional: if you selected a network to add to the zone in step 7, connect it to the DNS resolver by checking the network. You can connect a network to a DNS resolver at any time, even if the network is not added to the zone.
-
Optional: add records to the zone by clicking Add record and filling in the fields based on the required record type. You can add, edit, and delete records at any time after creating the zone.
A or AAAA
CNAME
MX
TXT
If a network is added to a zone, A and AAAA records are created and added automatically; you do not need to create or update them manually. To add a record manually:
9.1.Select the record type — A or AAAA.
9.2.Enter the domain name for which the record will be created. The domain of the zone in which you are creating the record will be added to it automatically.
9.3.Enter the IP addresses to be associated with the domain name: for an A record, IPv4 addresses; for an AAAA record, IPv6 addresses. You can specify a maximum of 100 IP addresses. Separate addresses with a comma or space, or place each address on a new line.
9.4.Enter the record TTL in seconds. To use the zone TTL, enter
-1or click Use zone TTL.9.5.Click Add.
9.6.To add another record, click Add record and repeat steps 9.1–9.5.
-
Click Create DNS zone.
-
If you connected a network in the zone to the DNS resolver in step 8, specify the resolver IP addresses in the subnet settings of that network. Use the Change DNS servers on a private subnet subsection of the Private networks and subnets guide.
The DNS resolver IP addresses in a network can be viewed in the Control panel: from the top menu, click Products → Cloud Servers → Private DNS → DNS resolvers tab → network row → DNS resolver field.