Split-Horizon DNS with Cloud DNS Private Zones Explained

GCP Study Hub
November 17, 2026

Split-horizon DNS is a setup in which internal clients and internet users get different answers for the same hostname. In Cloud DNS, it is built with a private zone that carries the same name as a public hostname and is authorized only for a chosen VPC network. VMs in that network resolve the name to an internal address, such as the IP address of an internal load balancer, while everyone on the internet keeps resolving it to the public address. For the Professional Cloud Network Engineer exam, the topic is mostly about recognizing when this pattern fits and why the nearby DNS features do not produce the same result.

How a private zone produces a different answer

The configuration has three parts. You create a private zone in Cloud DNS whose name matches the public hostname, you add a record that points to the internal address, and you authorize the zone only for the VPC network whose clients should see that answer. When the internal address is the frontend of an internal load balancer, clients inside the network reach the service over a private path rather than through the public frontend.

The behavior comes from how VMs resolve names. VMs in a VPC network send their DNS queries through the metadata server, and the metadata server checks any private zone authorized for that network before it consults public DNS. When a VM in the network looks up the hostname, the authorized private zone answers first with the internal record. The VM receives the internal address and keeps using the hostname its configuration already expects, so nothing in the application or its settings has to change.

Internet users never see the private zone. Their queries go to the public zone as before, and they continue to receive the public address. The same name therefore resolves to two different addresses depending on whether the query starts inside the authorized VPC network or out on the internet.

Same name, different answer

The defining property of split-horizon DNS is that the hostname stays the same and only the answer changes. Giving internal clients a separate name, such as a record in a new internal subdomain, can also resolve to an internal address, but then those clients have to call a different hostname. Split-horizon DNS reuses the existing name, so client configuration stays as it is.

A private zone changes only the address a name resolves to. Internal clients still need network reachability to the internal address, including firewall rules that allow the traffic.

Visibility is the mechanism

Split-horizon DNS has to separate clients by the network they query from, not by where they are or which server answers. Answers chosen by query location can't make that split, because a client inside the VPC network and an internet user in the same area look alike to a location-based policy such as a geolocation routing policy on a public zone, and such a policy could even hand a private address to outside users. Forwarding doesn't make the split either, since forwarding a query to the public zone's own name servers brings back the same external address internet users get.

Split-horizon DNS depends on visibility, not on location or forwarding. The private zone is visible only to the networks it is authorized for, and the metadata server checks it first for those networks. That combination is what lets one hostname return an internal address inside the VPC network and a public address everywhere else. On the Professional Cloud Network Engineer exam, the signals for this design are a hostname that must stay the same, internal clients that should reach an internal address, and internet users who must keep getting the public one.

Our Professional Cloud Network Engineer practice exams cover split-horizon DNS alongside Cloud DNS private zones and internal load balancing, with detailed explanations that drill these distinctions.

Get tips and updates from GCP Study Hub

arrow