Private DNS: Quick start
To configure DNS in a private network of the Cloud Platform, 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 modifying a port in this network automatically creates or updates an A or AAAA record for it. The fully qualified domain name (FQDN) of the port in the record is formed 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 dedicated server private network, connection is established via the global router; for details, see the Configure DNS in a dedicated server private network instructions.
To configure private DNS in a Cloud Platform network:
-
In the control panel, in the top menu, click Products and select Cloud Servers.
-
Go to Private DNS.
-
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 digits, Latin letters, and hyphens. The domain cannot be a top-level domain, for example,
example. -
Optional: enter TTL in seconds or leave the default value. TTL is the time during which zone resource records in the NS server cache are considered valid and do not require re-caching. The zone TTL will apply to records that do not have their own TTL specified.
-
Optional: select the network to add to the zone. If you add a network to the zone, A or AAAA records will be automatically created and updated for ports in the network. You can add a network to the zone at any time.
-
Optional: if in step 7 you selected a network to add to the zone, connect it to a DNS resolver by selecting 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 fill in the fields depending 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 and 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 where you are creating the record will be automatically appended to it.
9.3.Enter the IP addresses that will be associated with the domain name: IPv4 addresses for an A record, IPv6 addresses for an AAAA record. You can specify up to 100 IP addresses. Enter addresses separated by commas or spaces, or each address on a new line.
9.4.Enter the record TTL in seconds. To apply 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 in step 8 you connected the network in the zone to a DNS resolver, specify the resolver IP addresses in the subnet settings of this network. Use the Change DNS servers in a private subnet section of the Private networks and subnets instructions.
You can view the DNS resolver IP addresses in the network in the control panel: in the top menu, click Products → Cloud Servers → Private DNS → DNS resolvers tab → network row → DNS resolver.
-
Optional: if in step 8 you connected the network in the zone to a DNS resolver, enable resolution of public domains by enabling the recursor on the DNS resolver.