Before you associate private zones with VPCs, make sure that you have added records to the zones. For more information about how to add records, see Add records to a private zone.
On the ECS instance placed in the VPC that is associated with a private zone, the private zone record overrides the DNS record on the Internet. Note: The DNS record in the public network remains unaffected outside the VPC. We recommend that you add records for your private zone. For queries initiated within the VPC, an empty record in the private zone may override the DNS record on the Internet, which causes errors.
Assume that you have added a private zone
aliyun.com and have added records for the zone. Then you can associate the private zone with a VPC. When an ECS instance in this VPC access the subdomains of
aliyun.com, the private zone record for
aliyun.com is used and overrides the DNS record in public networks.
To associate a private zone with a VPC, follow these steps.
Log on to the Alibaba Cloud DNS console. In the left-side navigation pane, click Zone list under PrivateZone.
Find your target private zone, and click Bind VPC in the Actions column.
Note: For private zones with zero record, the system will remind you to add records first.
In the Bind VPC dialog box, select a region in Regions and select one or multiple VPCs in the region, and then add the VPCs to the Bound VPCs.
You can repeat steps 2~4 to associate the private zone with more VPCs or disassociate the private zone from VPCs.