Split-horizon DNS is a configuration in which the same domain name resolves to different answers depending on who asks, most often giving internal clients private addresses and internet clients public ones. In DNS, the core naming system of the Internet, it is also called split DNS, and it is a deliberate policy decision made by the operator of an authoritative or recursive server rather than a protocol feature.
The technique lets an organization publish one name, such as app.example.com, while steering employees to an internal load balancer and customers to a public edge address. It solves real routing and privacy problems, but it also creates two versions of the truth that must be kept consistent, which is where most operational trouble begins.
How split-horizon DNS selects an answer
A split-horizon server answers each query by first classifying the client and then consulting the zone data assigned to that class. The classifier is usually the source IP address of the query, matched against address lists that define the internal network, partner networks or the public internet.
In BIND, the mechanism is implemented with views: each view has a match-clients list and its own copy of the zone. Other servers use equivalent constructs, such as policy-based DNS in Windows Server, GeoDNS rules in commercial platforms, or separate server instances that hold different zone files. The resolver on the client side never knows a split exists; it simply receives the answer for its view.
The following table shows how a single name can map to different records across typical views.
| View | Client source | Answer for app.example.com |
|---|---|---|
| Internal view | 10.0.0.0/8 office and VPN ranges | 10.20.5.15 (internal load balancer) |
| Partner view | Dedicated partner address block | 172.16.40.8 (private interconnect) |
| External view | All other addresses | 203.0.113.25 (public edge proxy) |
Selection by TSIG key is also possible and is more robust than address matching, because a signed query proves which server or client sent it. This approach is common for zone transfers between views, where an address alone cannot distinguish two views hosted on the same secondary server.
Common deployment models
Organizations implement split-horizon DNS in a few recognizable patterns, and the choice determines how much duplication and how much risk of drift the operators accept. Each model below has been used widely; none is universally superior.
| Model | How it works | Main advantage | Main drawback |
|---|---|---|---|
| Views on one server | One authoritative server holds several views | Single place to manage policy | A misclassified client sees the wrong zone |
| Separate internal and external servers | Internal resolvers host a private copy of the zone | Strong isolation of internal data | Two zone files drift apart |
| Conditional forwarding | Internal resolvers forward one zone to private authoritative servers | Simple to add to existing resolvers | Forwarding failures break internal names |
| Cloud private zones | A private hosted zone is attached to selected virtual networks | Managed service with access control | Names resolve only inside attached networks |
A frequent variant is partial overlap, where the internal view contains only a handful of overridden records. Many servers do not merge views automatically, so an internal zone that defines example.com must also contain every public record that internal users need, such as mail exchangers and verification TXT records, or those names will fail internally.
Split-horizon DNS compared with related techniques
Split-horizon DNS is easily confused with neighboring concepts because several techniques produce location-dependent answers. The distinction lies in why the answer differs and who controls the decision.
| Technique | Basis for different answers | Typical goal |
|---|---|---|
| Split-horizon DNS | Network membership or trust level of the client | Internal versus external routing and privacy |
| GeoDNS | Approximate geographic location of the resolver | Send users to the nearest region |
| Anycast | Routing of one address to many sites | Same answer, nearest server by network path |
| Private-use TLD | A name that does not exist publicly at all | Purely internal namespace |
| Hosts file overrides | Static entries on one machine | Local testing or emergency fixes |
Split-horizon DNS interacts closely with the DNS cache and Time to live values. A laptop that caches an internal answer and then leaves the office will keep using a private address that is now unreachable until the cached record expires, which is a classic source of intermittent failures.
Practical design and configuration guidance
A sound split-horizon design starts with a clear inventory of which names genuinely need different answers. The fewer names that differ, the smaller the surface for inconsistency, so many teams use a dedicated internal subdomain, such as corp.example.com, instead of splitting the main zone.
- Generate both views from one source of truth, such as an IP address management system or a templated repository, rather than editing two zone files by hand.
- Define view membership precisely, including VPN pools, container networks and IPv6 ranges that are easy to forget.
- Use short TTLs for records that differ between views when clients roam between networks.
- Monitor both perspectives with probes inside and outside the network that compare answers continuously.
- Document the split so that incident responders know a name can legitimately return two different addresses.
The decision table below summarizes when split-horizon DNS is a good fit and when an alternative is wiser.
| Situation | Recommended approach | Reason |
|---|---|---|
| Internal users must reach a public service by its private path | Split-horizon override for that name | Avoids hairpin NAT and external round trips |
| Internal hostnames must stay hidden | Separate internal subdomain | No risk of leaking records into the public view |
| Hybrid cloud with private endpoints | Private zones plus conditional forwarding | Matches the cloud provider’s network model |
| Remote staff on and off VPN | Split-horizon with short TTLs | Limits stale cached answers after network changes |
Limitations, risks and failure modes
The most serious limitation is configuration drift: a record added to the external view but forgotten in the internal one works for customers and fails for employees, or the reverse. Such faults are hard to diagnose because each group reports a different experience of the same name.
Encrypted DNS is a newer risk. Browsers and operating systems that use DNS over HTTPS or DNS over TLS with a public resolver bypass the internal server entirely, so internal clients receive external answers. Enterprises typically counter this with managed browser policies or a canary domain that signals clients to disable automatic encrypted DNS.
DNSSEC adds further care. Each view that is signed needs valid signatures, and an internal view that overrides a signed public zone must either be signed with the same keys or be served to validators that are configured to trust it; otherwise validating resolvers return SERVFAIL. Leaking internal records through a misclassified client or an open zone transfer is another common security finding.
| Symptom | Likely cause | Fix |
|---|---|---|
| Name works externally but not internally | Record missing from internal view | Generate views from one source |
| Remote users fail after leaving VPN | Cached private answer | Lower TTL, flush cache on disconnect |
| Internal clients get public addresses | Encrypted DNS to a public resolver | Enforce resolver policy on managed devices |
| Validation failures on internal names | Unsigned override of a signed zone | Sign the internal view or use a separate subdomain |
Put simply
Split-horizon DNS is like a building receptionist who gives directions based on who is asking. A staff member asking for the finance office is sent down the internal corridor, while a visitor asking for the same office is sent through the front entrance. Both get the right destination, but by different routes.
The catch is that the receptionist needs two accurate sets of directions. If one set is updated and the other is forgotten, one group gets lost. Keeping both versions in sync is the whole job.
In practice
A mid-sized software company hosts its customer portal at portal.example.com. Public visitors resolve the name to 203.0.113.40, a reverse proxy at the network edge. Engineers in the office, however, previously had to leave the network and come back through the firewall, which caused hairpin NAT problems and slow uploads.
The network team creates an internal view on its resolvers that answers portal.example.com with 10.30.2.10, the application’s internal load balancer, and keeps every other record identical through a script that builds both views from one repository. They set a TTL of 300 seconds on the overridden record so laptops that leave the office stop using the private address within five minutes.
After rollout, internal upload times fall noticeably and firewall logs show no more hairpin traffic. A month later, a monitoring probe flags that a newly added mail verification record exists only externally, and the shared build script corrects it in both views, showing why automated generation matters.