Configuring a Private Zone
Scenarios
If you have deployed ECSs and other cloud services on the cloud, you can configure private domain names for the ECSs so that they can communicate using domain names within VPCs.
You can create any private zones for domain names that are unique within VPCs. You do not need to register the domain names.
This section describes how to configure a private zone for a private domain name and add an A record set.
Prerequisites
You have created an ECS and obtained its VPC name and private IP address.
Process
Figure 1 shows the process for configuring a private zone for a domain name.
Create a Private Zone
To access an ECS using a private domain name, you need to create a private zone for the ECS.
- Log in to the management console.
- In the Network category, click Domain Name Service.
The DNS console is displayed.
- In the navigation pane, choose DNS Resolution > Private Zones.
The Private Zones page is displayed.
- Click
in the upper left corner and select the desired region and project. - Click Create Private Zone.
- In the displayed dialog box, set Name to example.com and select the VPC where the ECS is created. For detailed descriptions of the parameters, see Creating a Private Zone.Figure 2 Creating a private zone
- Click OK.
- Switch back to the Private Zones page. You can view the created private zone in the zone list on the Private Zones page.
Click the zone name to view detailed zone information. You can view SOA and NS record sets created by the system.
- The SOA record set defines the DNS server that is the authoritative information source for a particular domain name.
- The NS record set defines authoritative DNS servers for a zone.
Add an A Record Set
To access the ECS using example.com, add an A record set.
- In the zone list on the Private Zones page, click the name of the private zone you created.
The Record Sets page is displayed.
- Click Add Record Set.
- In the displayed dialog box, enter the following information for the A record set:
- Name: Leave this parameter blank. The system automatically considers example.com as the name, and requests are routed to example.com.
- Type: Set it to A – Map domains to IPv4 addresses.
- Value: Enter the private IP address of the ECS.
Retain default settings for other parameters. For detailed descriptions of the parameters, see Adding an A Record Set.
Figure 3 Adding an A record set
- Click OK.
- Switch back to the Record Sets page.
The added record set is displayed in the list. Ensure that the status of the record set is Normal.
(Optional) Configure DNS Servers for VPC Subnets
To ensure that private domain names can be resolved in a VPC, you need to change the DNS server addresses for VPC subnets to those provided by the DNS service. For details, see What Are the Private DNS Server Addresses Provided by HUAWEI CLOUD DNS?
Query the private DNS server addresses provided by the DNS service
- Log in to the management console.
- In the Network category, click Domain Name Service.
The DNS console is displayed.
- In the navigation pane, choose DNS Resolution > Private Zones.
The Private Zones page is displayed.
- Click
in the upper left corner and select the desired region and project. - In the private zone list, click the name of the zone.
Change the DNS servers for VPC subnets
- Go to the private zone list.
- In the private zone list, click the VPC name under Associated VPC.
On the VPC console, change the DNS server addresses of the VPC subnet.
For details, see Modifying a Subnet.
Checking Whether the Record Sets Have Taken Effect
For details, see How Do I Test Whether a Record Set Is Working?
Last Article: Configuring Record Sets for Email Servers
Next Article: Configuring a PTR Record

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.