Private Zone resolves DNS queries through a defined lookup order. You can enable recursive resolution proxy for subdomains to resolve unconfigured subdomains through public DNS.
How it works
If the record value of a CNAME record is the same as the domain name being queried, a CNAME resolution loop occurs. The system immediately stops the process and returns the result.
When a client in a VPC sends a DNS query, the resolver first checks the associated Authoritative Zone added in Private Zone for a matching record. If the response contains a CNAME record value, the resolver starts a new query for the domain name in the CNAME record. Otherwise, the resolver returns the result to the client.
If no matching record is found in the Authoritative Zone, the resolver checks if the query matches a forwarding rule. If a match is found, the query is forwarded to an external DNS resolver. If the response contains a CNAME record value, the resolver starts a new query for the domain name in the CNAME record. Otherwise, the resolver returns the result to the client.
If the query does not match a forwarding rule, the resolver performs a public recursive resolution to get the result. If the response contains a CNAME record value, the resolver starts a new query for the domain name in the CNAME record. Otherwise, the resolver returns the result to the client.
Recursive resolution proxy for subdomains
With Subdomain Recursive Proxy enabled, Private Zone performs a public recursive resolution for any subdomain not configured in the Private Zone and returns the result to the VPC.
Host record | Type | TTL | Value |
host01 | A | 60 | 10.0.0.1 |
host02 | A | 60 | 10.0.0.2 |
host03 | A | 60 | 10.0.0.3 |
Queries for
host01.aliyun.com, host02.aliyun.com, or host03.aliyun.comreturn the configured private IP addresses10.0.0.1, 10.0.0.2, and 10.0.0.3, respectively.Queries for public domain names, such as
www.aliyun.com, api.alibabacloud.com, or rds.aliyun.com, are resolved through public recursive resolution. Private Zone returns the public DNS result as the final response.
Enable or disable feature
You can enable or disable recursive resolution proxy for subdomains when you add a Private Zone. For more information, see Add a Private Zone.
Log on to the Alibaba Cloud DNS - Private Zone console.
In the left-side navigation pane, click User Defined Zones. Then, find and click the domain name that you want to manage.
Click the Zone Settings tab. In the Subdomain Recursive Proxy section, toggle the switch to enable or disable the feature.
Enabling the feature does not affect the resolution of your existing DNS records.