Security · 4 min read

Split-Horizon DNS: Same Name, Different Answer Inside and Out

Split-horizon DNS, also called split-view DNS, is a security and operational pattern where the same fully qualified domain name (FQDN) returns different DNS records depending on whether the query originates from inside or outside your network. This technique separates internal infrastructure from public-facing services, protecting sensitive systems while maintaining usable DNS names across both contexts.

Why Split-Horizon DNS Matters

In many organizations, internal servers and services share names with public endpoints. For example, mail.example.com might resolve to a public-facing mail gateway when queried from the internet, but to an internal Exchange server when queried from inside the corporate network. Without split-horizon DNS, you would either expose internal IP addresses to the public internet or force internal users to use different hostnames than external clients—both poor practices.

Split-horizon DNS solves this by using DNS views or zones that respond based on the source of the query. This approach reduces attack surface, simplifies naming conventions, and allows internal and external services to coexist under the same domain.

How Split-Horizon DNS Works

Most DNS servers that support split-horizon functionality use Access Control Lists (ACLs) or views to determine which zone data to return. When a query arrives, the server checks the source IP address against defined ACLs. If the query comes from a trusted internal network, the server responds with the internal view. If it comes from an external source, the server responds with the public view.

BIND (Berkeley Internet Name Domain), Microsoft DNS Server, and other enterprise-grade DNS platforms all support this pattern. The implementation varies slightly, but the principle remains consistent: one name, multiple answers.

Practical Configuration Example

Here is a simplified example using BIND DNS syntax:

acl "internal" {
  10.0.0.0/8;
  172.16.0.0/12;
  192.168.0.0/16;
};

view "internal" {
  match-clients { internal; };
  zone "example.com" {
    type master;
    file "/etc/bind/zones/example.com.internal";
  };
};

view "external" {
  match-clients { any; };
  zone "example.com" {
    type master;
    file "/etc/bind/zones/example.com.external";
  };
};

In this configuration, queries from addresses in the internal ACL match the internal view and receive records from example.com.internal. All other queries match the external view and receive records from example.com.external. The two zone files can contain completely different records for the same names.

Common Use Cases

Best Practices

Split-horizon DNS is not a replacement for firewalls or network segmentation, but it is a valuable layer of defense and operational hygiene. It reduces the risk of accidental exposure of internal infrastructure and makes network administration more intuitive for users and administrators alike.

DNS Record Types reference
Free interactive guide to A, AAAA, MX, CNAME, NS, SOA, and other DNS record types.
Open →
Practise this on today’s Daily Ops Drill — a free network task every day.
Open the app →
Free tools for this
More from the blog
FortiGate NSE4 Lab: Implicit Deny and Why Your Permit Rule Isn't WorkingRead →Voice VLAN Bandwidth Sizing: Codec, Frame Size, and Overhead CalculationRead →