Help Center/ Domain Name Service/ FAQs/ Private Zones/ Can I Use Private Domain Names Across Regions?
Updated on 2024-08-12 GMT+08:00

Can I Use Private Domain Names Across Regions?

Private zones are region-level resources. They are created in specified regions and projects.

A private zone can be associated with more than one VPC and takes effect only in its associated VPCs. However, a private zone cannot be used across VPCs. If these VPCs are in the same region and connected over a VPC peering connection, the private zone can be accessed across VPCs.

In the following example, a private zone is created for domain name example.com, and it has two VPCs associated and two record sets.

Table 1 Record sets added to private zone example.com

Domain Name

Type

Value

ecs1.example.com

A

192.168.1.3

ecs3.example.com

A

192.168.2.3

Figure 1 shows how the private domain name is resolved.

Figure 1 Process for resolving a private domain name

All ECSs in VPC A and VPC B can access example.com.

If ECS 2 in VPC A accesses ecs3.example.com, the private DNS server returns 192.168.2.3, which is the IP address of ECS 3 in VPC B. There is no VPC peering connection between VPC A and VPC B. ECS 2 cannot access ECS 3 in VPC B using this IP address.