All Products
Search
Document Center

Alibaba Cloud DNS PrivateZone:Does the parsing result of a hostname in a private zone override the parsing result of the corresponding public hostname?

Last Updated:Dec 16, 2022

No. After you create a private zone, the parsing result of a hostname in the private zone does not immediately override the parsing result of the corresponding public hostname. However, if you access a hostname in a private zone from a virtual private cloud (VPC) after you associate the private zone with the VPC, the parsing result of the hostname overrides the parsing result of the corresponding public host.

If you want Alibaba Cloud DNS PrivateZone to parse hostnames that are specified in a private zone and public hostnames that are not specified in the zone, enable the recursive resolution proxy feature. For more information, see Recursive resolution proxy.

Example

  • Create a private zone named taobao.com

    After you create the taobao.com private zone, the data of the zone does not exist in the system if you do not associate the zone with a VPC. For example, if you want to parse www.taobao.com, the hostname is parsed into a public IP address.

  • Configure a DNS record

    If you want to associate taobao.com with a VPC, you must configure a DNS record in the zone. This prevents private hostnames that you want to parse from being blocked by a VPC when you associate an empty zone with the VPC.

    Before you associate a zone with a VPC, we recommend that you create hostnames that you want to parse for the zone.

  • Associated VPCs

    Associate the private zone that the ECS instance needs to access with the VPC where the ECS instance resides. The parsing result of a hostname in the private zone overrides the parsing result of the corresponding public host.

    For example, the following DNS record is configured for the taobao.com zone:

    Note

    www.taobao.com A 60 1.1.1.1

    When you run the ping www.taobao.com command on the ECS instance in the VPC, the IP address 1.1.1.1 is returned. The public IP address of www.taobao.com is overridden.