In this article12 sections

Instead of pointing your domains at your host’s nameservers, you point them at ns1.yourbrand.com and ns2.yourbrand.com. Customers of a hosting reseller see the reseller’s name. An agency keeps all its clients’ DNS under one name. A business that moves servers does not have to ask every domain owner to change nameservers again, because the names stay the same and only the addresses behind them change.

They are called private nameservers, vanity nameservers or child nameservers, and they are simple in concept and surprisingly easy to get wrong in practice. The reason is one chicken-and-egg problem that has a name, and a solution that has a name: glue records. This guide explains both, then walks through the setup in the right order and shows how to test it.

The problem: a nameserver that lives inside the zone it serves

Suppose your domain is example.com and you want nameservers ns1.example.com and ns2.example.com. To find www.example.com, a resolver asks the .com servers “who is responsible for example.com?”, and is told: ns1.example.com. Then it asks ns1.example.com for the answer. But to ask ns1.example.com, it needs its IP address, and that address is a record in the example.com zone, which is the very zone it is trying to look up. It is stuck.

The solution: glue records

A glue record is an address supplied by the parent, here the .com registry, alongside the delegation. When the .com servers tell a resolver “ask ns1.example.com“, they include “and its address is 203.0.113.10”. The resolver can then go straight to your server. Glue records are not set in your own DNS zone. They are set at your domain registrar, which passes them to the registry. Registrars call the feature different names: “register a nameserver”, “host records”, “child nameservers”, “personal nameservers” or “glue records”. It is all the same thing.

If a registrar offers no such option, you can often only use nameserver names that are already registered elsewhere. That is a reason to choose a registrar that supports host records.

What you need before you start

  1. A domain you control at a registrar with host/glue record support, for example yourbrand.com. It is common to use your main brand domain.
  2. Two servers, or two IP addresses on different networks, that will answer DNS queries. Many registries require two different IP addresses, and your domains need to stay resolvable if one server is down. A single server with two IPs on the same network does not protect you from that server failing.
  3. DNS server software on those machines: the panel’s built-in DNS (cPanel’s PowerDNS or BIND, Plesk’s BIND), or BIND, PowerDNS or Knot on a plain server.
  4. Port 53 open for both UDP and TCP to the world on the servers’ firewall and at the provider. DNS uses TCP for large answers and zone transfers.

Step 1: Create the zone and the A records

The domain that contains your nameserver names must itself be served correctly. In its zone, create address records for each nameserver:

ns1.yourbrand.com.   IN A   203.0.113.10
ns2.yourbrand.com.   IN A   198.51.100.20

If yourbrand.com is currently hosted somewhere else, create these records in that zone too. They must match the glue records you will register in Step 2, and keeping them identical avoids a mismatch later.

Step 2: Register the glue records at the registrar

In the registrar’s control panel, find the host records section and add:

  • host ns1 of yourbrand.com with IP 203.0.113.10
  • host ns2 of yourbrand.com with IP 198.51.100.20

Some registrars show it as “Register Nameserver” with the two fields (hostname and IP). When saved, the registrar forwards the data to the registry, which publishes the glue. This is not instant: registry updates may take from minutes to a few hours.

Step 3: Set the nameservers on the domain

Still at the registrar, set the nameservers of yourbrand.com (and your customers’ domains, when you use them) to ns1.yourbrand.com and ns2.yourbrand.com. For domains registered elsewhere, owners make the same change at their registrar.

Do this only after the servers are answering for the zones (Step 4). If you delegate a domain to nameservers that do not yet serve it, the domain goes dark.

Step 4: Configure the DNS servers

On a cPanel/WHM server, set the nameserver names in WHM’s Basic WebHost Manager Setup (reseller accounts set their own nameservers in their account’s branding or nameserver settings). Create the A records for ns1 and ns2 in the zone, using WHM’s DNS functions. On Plesk, create the zone for yourbrand.com with the same A records, and enable DNS service on the server.

For a plain server, a minimal authoritative setup needs: the software installed and running, a zone for yourbrand.com with NS records for ns1 and ns2, the A records above, and an SOA record with a serial number that you increase on every change. For a secondary server, configure it as a secondary (replica) of the first, with zone transfers restricted to the secondary’s address only, or run the same zones on both.

Two settings matter for safety:

  • Disable recursion on public nameservers. An authoritative server answers only for its own zones; one that also answers every query for anyone becomes an open resolver, which attackers abuse for traffic amplification. In BIND: recursion no; or allow-recursion { localhost; };.
  • Restrict zone transfers. Allow AXFR only to your secondary servers.

Step 5: Test it, in the right order

Check each layer separately, from the bottom up. Replace names and addresses with yours.

Does each server answer authoritatively for the zone? Ask them directly, by IP address:

dig @203.0.113.10 yourbrand.com SOA +norecurse
dig @198.51.100.20 yourbrand.com SOA +norecurse

You should get an answer with the aa flag (authoritative answer) in the flags line. The two serial numbers in the SOA record should match; if they differ, the secondary is not in sync.

Does TCP work?

dig @203.0.113.10 yourbrand.com SOA +tcp

Does the parent publish the glue? Ask the registry’s servers, which for .com are in the gtld-servers.net set:

dig @a.gtld-servers.net ns1.yourbrand.com A +norecurse
dig @a.gtld-servers.net yourbrand.com NS +norecurse

The answer should list your two nameservers in the authority section and your IP addresses in the additional section, which is the glue.

Does a full lookup from the root work? dig +trace follows the chain from the root down and shows exactly where it breaks:

dig +trace www.yourbrand.com

Do the delegation and the zone agree? The NS records the registry publishes (parent) must match the ones in your zone (child). A mismatch is called a lame or inconsistent delegation and causes intermittent failures.

How long until it works?

Delegation records at top-level domains often have a long TTL; for .com the nameserver delegation is cached for 48 hours. A change to which nameservers a domain uses can take up to that long to be seen everywhere, even though many resolvers update sooner. Plan changes with that in mind, and keep the old DNS service serving the zone until the change has settled.

Common problems

  • “Nameserver not registered” or “must have glue”: you tried to use ns1.yourbrand.com before registering the host record. Register it first.
  • Same IP address for both: some registries or registrars refuse it. Use two distinct addresses.
  • Wrong glue after a server move: the A record in your zone was updated, but the glue at the registrar still points at the old address. Update the host record at the registrar whenever the nameserver’s IP changes.
  • Lame delegation: the domain points to a server that is not configured for that zone. Resolvers get REFUSED or SERVFAIL.
  • Firewall blocks TCP 53: large answers and some resolvers fail intermittently.
  • DNSSEC mismatch: if you change the nameservers of a signed domain without updating or removing the DS record at the registrar, validating resolvers refuse the zone. Plan DNSSEC changes carefully.
  • Only one server: when it goes down, every domain using it stops resolving.

Make them reliable

Run the two nameservers on separate hosts and networks, monitor both (a query for a known record, every few minutes, from outside), and keep the zone data in sync. A hosted DNS service with anycast can serve as the secondary if you want resilience without running a second server.

When it is worth getting help

Private nameservers touch the registrar, the DNS software, the firewall and every domain that will use them, and a mistake takes domains offline. If you are launching a hosting business, moving servers, or consolidating clients, I can set up the nameservers, test them from outside and migrate the domains across with minimal downtime.

You can see my profile on Upwork, or read about the email and DNS service. If you are also moving the sites, see how to plan a cPanel and Plesk migration.