What is split-horizon DNS, and what problems appear when authoritative servers give internal and external clients different views of the same names?
answer
- the answer depends on who asks
- views keyed on query source
- not part of the protocol
- which resolver asked
- two copies to keep in step
basics
~20 sSplit-horizon DNS has authoritative servers answer the same names differently depending on who asks, usually an internal and an external view. Costs: two versions to keep consistent, answers that depend on the resolver's location, leaks between views, and confusing debugging.
solid answer
~50 sIn split-horizon DNS an authoritative server holds several **views** of a zone and picks one per query, usually by the source address, so internal clients get private addresses and internal-only names while the Internet sees a smaller public zone. RFC 9499 notes views "are not a standardized part of the DNS, but they are widely implemented". The problems: two versions of the zone drift apart and each needs its own serial and transfer path; the server sees the **recursive resolver's** address, not the user's, so a laptop on VPN still using an outside resolver gets the external view; a forwarder serving both populations can mix answers in one cache; internal names can leak into the public view; and the same query gives different answers depending on where you test. A cleaner alternative is an internal-only subdomain that the public parent never delegates.
go deeper
Recall that split-horizon DNS gives different answers for the same name to internal and external clients, usually chosen by where the query comes from.
Explain views: the authoritative server selects a zone version per query, typically by the source address, which belongs to the recursive resolver rather than the user.
Anticipate the failures: VPN clients on outside resolvers, forwarders mixing views in one cache, drift between views, leaked internal names, and per-view transfers.
Decide whether to split at all: compare split views with an internal-only subdomain or identical public answers, and own who counts as inside.
## What split-horizon means **Split-horizon DNS** (also called **split DNS**) is an authoritative setup where the same names get different answers depending on who asks. RFC 9499 describes it as authoritative servers that "provide partly or completely different answers in those domains depending on the source of the query", with the consequence that "a domain name that is notionally globally unique has different meanings for different network users". The usual mechanism is a **view**: a server configuration that selects which version of a zone to answer from. RFC 9499 says views typically differ by the source address of the query, but can also key on the destination address, the query type (for example, `AXFR`) or whether the query is recursive, and adds that views "are not a standardized part of the DNS, but they are widely implemented in server software". Nothing on the wire tells a client which view it got. Typical reasons to split: - internal clients should reach private addresses while outsiders reach public ones; - some names should exist only inside the network; - the organisation prefers not to publish its internal inventory. ## Who the server actually sees The central trap: an authoritative server almost never sees the end user. It sees the **recursive resolver** that forwards the user's question. The view is chosen by that resolver's address. | Client situation | Resolver it uses | View it gets | |---|---|---| | office desktop | internal resolver | internal | | laptop at home, no VPN | home or ISP resolver | external | | laptop on VPN that kept its home resolver | home or ISP resolver | external, although the user is "inside" | | internal resolver forwarding to an outside service | the outside service | external | So "inside" in a split-horizon design means "using a resolver whose address the internal view trusts", which is not the same as being on the network. Extensions that carry part of the client's address to the authoritative server exist, but they are optional and belong to answer-steering material, not to split-horizon's basic mechanism. ## The operational costs 1. **Two versions to keep consistent.** A record that must be identical in both views is now edited twice. Each view is effectively its own zone with its own serial; drift shows up as "works inside, broken outside". 2. **Replication per view.** Secondaries must receive the right version of each view. Since views can key on the query type or on the requester, transfers need to be scoped so a secondary serving the external view never receives the internal one. 3. **Mixed caches.** A resolver that serves both populations, or forwards on their behalf, caches whichever view answered first and hands it to everyone until it expires. 4. **Leaks.** An internal name accidentally added to the external view is published to the world; an externally reachable resolver that is allowed to query the internal view hands internal answers to anyone. 5. **Debugging confusion.** The same query from two places returns two correct-looking answers. Every investigation starts with "which resolver, and which view?". 6. **Signing complications.** If the zone is DNSSEC-signed, each view's data must be signed consistently; the signing itself is DNSSEC material. ## Security expectations Split-horizon hides names from casual lookup; it is not an access control. Anyone who can use an internal resolver sees the internal view, and names leak through logs, certificates and configuration files. Services that must be private need network or application-level controls regardless of what DNS returns. ## Alternatives and when to prefer them - **An internal-only subdomain.** Put internal names under, say, `corp.example.com`, served only by internal authoritative servers, and do not delegate it from the public `example.com` zone. Outsiders get a nonexistent name; insiders' resolvers are configured to reach the internal servers. No name has two meanings. - **The same answer everywhere.** Publish public addresses for public services and rely on routing for internal clients, accepting a hairpin path. - **Split only where necessary.** Keep most of the zone identical in both views and diverge on a documented, small set of names. Split-horizon is sometimes the pragmatic choice, for example when a service must be reached by one name from both sides at different addresses. The judgement is to keep the divergent set small, to own the resolver configuration that decides who is "inside", and to document which view each population gets.
- Why can a user on the internal network still get the external view in split-horizon DNS?The authoritative server chooses the view from the query's source, which is the recursive resolver, not the user. If the user's device, or the internal resolver itself, sends queries through a resolver outside the trusted range, the authoritative server sees an outside address and answers from the external view.
- How does an internal-only subdomain avoid most split-horizon problems?Names under the internal subdomain have exactly one meaning: they exist on the internal authoritative servers and nowhere else, because the public parent zone never delegates them. There is no second version to keep in sync and no chance of mixing views in a cache; the only thing to manage is which resolvers are configured to reach those internal servers.
saying these in an interview costs you the question
- The server picks the view from the end user's own IP address.
- Views are a standard DNS mechanism defined in the core RFCs.
- Split-horizon DNS on its own keeps internal services private.
- Putting a few internal names in the external view is harmless.
- One zone transfer keeps both views in sync automatically.