How to manage internal names with a Google Cloud DNS private zone
A Cloud DNS private managed zone is a DNS zone that can be queried only from the Google Cloud VPC networks you authorize. It can manage internal application names and return VPC-specific internal answers for the same name, but creating the zone does not automatically make it available to every project, peered VPC, or on-premises client. First authorize the VPCs that should query it, then plan their DNS resolution and any hybrid path. ([Google Cloud: Cloud DNS overview](https://docs.cloud.google.com/dns/docs/overview), [Google Cloud: DNS zones overview](https://docs.cloud.google.com/dns/docs/zones/zones-overview))
How to manage internal names with a Google Cloud DNS private zone
A Cloud DNS private managed zone is a DNS zone that can be queried only from the Google Cloud VPC networks you authorize. It can manage internal application names and return VPC-specific internal answers for the same name, but creating the zone does not automatically make it available to every project, peered VPC, or on-premises client. First authorize the VPCs that should query it, then plan their DNS resolution and any hybrid path. (Google Cloud: Cloud DNS overview, Google Cloud: DNS zones overview)
For example, suppose internal services use corp.example.com.. If you create a private zone and authorize only prod-vpc, VMs in that VPC can resolve payments.corp.example.com using its private record. An unauthorized VPC cannot query that private zone. For on-premises clients to resolve the same name, you also need a Cloud VPN or Cloud Interconnect path, Cloud DNS inbound forwarding, and conditional forwarding from corporate DNS. (Google Cloud: Create and modify private zones, Google Cloud: Cloud DNS best practices)
What does a private zone expose, and where does it apply?
A DNS zone manages names and records that share a suffix. A private managed zone is not published to the public internet; Cloud DNS considers it only for VPC networks authorized in the zone settings. The existence of a record or a zone in a Cloud DNS project does not grant other VPCs permission to use it. Zone visibility defines the DNS authorization boundary, separate from network routing. (Google Cloud: Cloud DNS overview, Google Cloud: Create and modify private zones)
A private zone can use the same DNS suffix as a public zone, enabling split-horizon DNS. For example, an authorized VPC might resolve app.example.com to an internal IP while internet clients receive the public zone's answer. However, a more-specific private suffix can take precedence, and if that selected zone lacks a matching record, Cloud DNS might return NXDOMAIN rather than continue to the public zone. Design the masking intentionally and account for missing records. (Google Cloud: VPC name resolution order, Google Cloud: DNS zones overview)
Which DNS answer wins when zones overlap?
Cloud DNS chooses the most specific matching suffix, also called longest-suffix matching, among zones the VPC is authorized to query. For example, if a VPC can use zones gcp.example.com. and dev.gcp.example.com., a query for api.dev.gcp.example.com checks the more-specific dev.gcp.example.com. zone first. If that zone has no matching record, Cloud DNS may return NXDOMAIN rather than fall back to the parent zone. Assign owners for subzones and their records. (Google Cloud: VPC name resolution order, Google Cloud: Troubleshoot Cloud DNS)
VPC name resolution follows the applicable response policies, authorized private/forwarding/peering zones, Compute Engine internal DNS, public DNS, and the network's configured policies. An outbound server policy can change this order by sending queries to alternative name servers; if one responds, Cloud DNS can return that answer, including NXDOMAIN. Such a policy can also prevent expected resolution through Cloud DNS private zones or internal VM names. Review the resolver order before directing all queries to alternative servers. (Google Cloud: VPC name resolution order, Google Cloud: DNS server policies overview)
CNAME behavior is scheduled to change. According to Google's announcement, starting January 5, 2027, follow-up queries in a CNAME chain will use the complete VPC name resolution order across public and private zones. Currently, a CNAME from a private zone might be followed only through authorized private zones, without checking public zones. Overlapping public/private names can cause unintended internal answers or resolution errors, so test CNAME chains with dig or nslookup before the change date. (Google Cloud: Cloud DNS release notes)
How do you create and verify a private zone?
These steps create a basic private zone whose records are managed by Cloud DNS. You need a Google Cloud project, the Cloud DNS API enabled, and permission to create zones. For Shared VPC, the usual setup creates the zone in the host project and authorizes the Shared VPC network. Cross-project binding from a service project is a separate configuration. (Google Cloud: Create and modify zones, Google Cloud: Cloud DNS overview)
In the Cloud DNS zone creation page, choose **Private** as the zone type.
Enter a zone name and DNS suffix, such as `corp.example.com.` with the trailing dot. Use a namespace you own or administer internally.
Under options, choose **Default (private)** and select only the VPC networks that should query the zone. Only selected networks are authorized.
Create the zone, then add required records such as A, AAAA, or CNAME records under its suffix. Cloud DNS creates SOA and NS records automatically; do not arbitrarily change the authoritative NS record name or server list.
From a VM in an authorized VPC, query the name. For example, `dig payments.corp.example.com @169.254.169.254` queries the Google Cloud metadata DNS server directly. Also check what the application's configured resolver returns.
If the answer differs from expectations, check the VM's VPC, zone authorization, queried suffix, more-specific zones, and outbound server policies in that order. ([Google Cloud: Create and modify zones](https://docs.cloud.google.com/dns/docs/zones), [Google Cloud: Troubleshoot Cloud DNS](https://docs.cloud.google.com/dns/docs/troubleshooting))
Record two results separately: “the authorized VPC's metadata DNS server returns the expected record” and “the resolver used by the application returns the same answer.” A difference can indicate a custom DNS configuration in the guest OS or a local cache. Private zones assume that VMs use the default metadata DNS server; if you use a custom name server, design that resolution path separately. (Google Cloud: Troubleshoot Cloud DNS)
How can other VPCs and on-premises clients resolve private names?
VPC Network Peering provides network routes, but it does not automatically share DNS zone visibility or name resolution. If another VPC must query a namespace, create a DNS peering zone. This is a one-way relationship: the DNS consumer VPC uses the DNS producer VPC's resolution order. It is not the same connection as VPC Network Peering. Be clear about which side owns the namespace and which side delegates lookups. (Google Cloud: DNS zones overview, Google Cloud: Cloud DNS best practices)
For on-premises DNS clients to query a Cloud DNS private zone, configure an inbound server policy on the connected VPC and send DNS queries to its inbound forwarding IPs over Cloud VPN or Cloud Interconnect. On corporate DNS, configure conditional forwarding for only the required domains to those Google Cloud forwarding addresses. Also check the documented network requirements, including return routes, TCP/UDP port 53 firewall rules, and any forwarding source range that Cloud Router must advertise to on-premises. (Google Cloud: DNS server policies, Google Cloud: Cloud DNS best practices)
Conversely, if Google Cloud VMs need to resolve corporate DNS names, a forwarding zone for those domains can target on-premises DNS servers. If several VPCs need the same on-premises DNS, consider forwarding centrally from one VPC and having other networks use its resolution order through DNS peering instead of duplicating outbound forwarding everywhere. Inbound and outbound forwarding solve different directions; do not assume one policy handles both automatically. (Google Cloud: Cloud DNS overview, Google Cloud: Cloud DNS best practices)
How do you troubleshoot lookups, and when is a private zone suitable?
First query the same name from a VM in an authorized VPC and from the actual client. Then check whether the VM's VPC is authorized, whether the suffix matches, which longest-suffix zone is selected, whether response or alternative-name-server policies apply, and whether a custom resolver is in use. Consider local DNS caches and TTLs. If only on-premises lookup fails, check the VPN/Interconnect path, inbound forwarding policy, DNS port 53 firewall rules, and conditional forwarding before changing the zone itself. (Google Cloud: Troubleshoot Cloud DNS)
A private zone is useful for internal names of VPC resources and split-horizon DNS limited to selected networks. With several VPCs, Shared VPC, and corporate DNS, you must manage zone visibility, DNS peering, forwarding direction, and resolver order together. A private zone does not replace network connectivity, service authentication, or firewall access. Record the zone suffix and owner, authorized VPCs, any overlapping public zone, subzone ownership, hybrid query path, CNAME targets, and planned behavior changes in the design.
Official documentation
[Cloud DNS overview](https://docs.cloud.google.com/dns/docs/overview)
[DNS zones overview](https://docs.cloud.google.com/dns/docs/zones/zones-overview)
[Create and modify Cloud DNS private zones](https://docs.cloud.google.com/dns/docs/zones)
[VPC name resolution order](https://docs.cloud.google.com/dns/docs/vpc-name-res-order?hl=en)
[DNS server policies overview](https://docs.cloud.google.com/dns/docs/server-policies-overview)
[Create a Cloud DNS forwarding zone](https://docs.cloud.google.com/dns/docs/zones/forwarding-zones)
[Cloud DNS best practices and hybrid DNS](https://docs.cloud.google.com/dns/docs/best-practices)
[Troubleshoot Cloud DNS](https://docs.cloud.google.com/dns/docs/troubleshooting)
[Cloud DNS release notes: CNAME behavior change](https://docs.cloud.google.com/dns/docs/release-notes)