Help

How to set up private nameservers (ns1 and ns2 on your domain)

To set up private nameservers, get the nameserver IP addresses from your host, then register ns1 and ns2 on your domain as child nameservers at your registrar. Add matching A records in your DNS, set the names in WHM, and point client domains to them. Changes can take up to 48 hours to reach every network.

Updated · HostUpIndia team

What are private nameservers?

Private nameservers, also called child nameservers, are nameservers named on your own domain, such as ns1.youragency.com and ns2.youragency.com. They point to your host’s DNS servers, so clients see your brand, not your host’s, when they look up their domain.

The registry stores an IP address for each name. These are called glue records, and they let lookups find a nameserver that sits inside the domain it serves.

Before you start, you need:

  • A domain you own for the nameservers, such as youragency.com. Choose one you will keep, and renew it on time: every client domain depends on it.
  • The IP addresses for ns1 and ns2, from your welcome email or client area. Ask support if they are not there.
  • A login at the registrar where that domain is registered.
  • Your WHM login, from your welcome email or client area.

Register child nameservers at your registrar

Do this at the registrar of your nameserver domain, not at your clients’ registrars.

  • Sign in at the registrar where youragency.com is registered.
  • Open the domain’s settings.
  • Find the child nameserver menu. It is often called Child Nameservers, Register Nameservers, Personal DNS Server or Host Names.
  • Enter ns1.youragency.com and its IP address. Some forms ask only for ns1.
  • Save it.
  • Add ns2.youragency.com and its IP address the same way, then save.

Add A records for ns1 and ns2

The names must also resolve in your domain’s own DNS. Add the records where that DNS is managed: cPanel’s Zone Editor, your registrar or a DNS provider.

  • Note the current DNS records, in case you need to switch back.
  • Open the DNS records for youragency.com.
  • Add an A record for ns1 with the first IP address.
  • Add an A record for ns2 with the second IP address.
  • On Cloudflare, set both records to DNS only. A proxied record cannot work as a nameserver.
  • Save the changes.

Set private nameservers in WHM

WHM writes your nameservers into the DNS zone of each new cPanel account. Some reseller accounts can change them; others need support to.

  • Log in to WHM.
  • Type “Basic WebHost Manager Setup” in the WHM search box.
  • If it opens, enter ns1.youragency.com and ns2.youragency.com in the Nameservers fields.
  • Select Save Changes.
  • If your WHM has no nameserver setting, ask support to set ns1 and ns2 as your reseller nameservers.
  • Accounts created before the change keep the old NS records. Update them in DNS Functions › DNS Zone Manager if your WHM has it, or ask support.

Point client domains to your nameservers

Each client sets their domain’s nameservers to yours. The steps at a registrar are the same as for any nameserver change: how to connect a domain to hosting.

  • Create the client’s cPanel account in WHM first, so its DNS zone exists. See how to create a hosting package in WHM.
  • If the domain is live, note its current nameservers and DNS records, so you can switch back.
  • Check its zone in WHM for every record it needs, such as MX and TXT for email hosted elsewhere. Add any that are missing before you switch.
  • Sign in at the registrar where the client’s domain is registered.
  • Turn off DNSSEC for the domain if it is on.
  • Set the nameservers to ns1.youragency.com and ns2.youragency.com.
  • Save the change.

Check private nameservers with dig

New child nameservers usually show within a few hours. A nameserver change for a client domain can take 24 to 48 hours to reach every network.

  • Run dig ns1.youragency.com A +short in a terminal. It should return the first IP address.
  • Run dig ns2.youragency.com A +short and check the second.
  • Run dig example.com NS +short for a client domain. It should list ns1 and ns2 on your domain.
  • On Windows, use nslookup ns1.youragency.com and nslookup -type=NS example.com.
  • If you still see the old nameservers, check the NS records in the domain’s zone in WHM, as above, then wait a few hours and check again.

HostUpIndia Reseller hosting

HostUpIndia Reseller plans are white-label Linux hosting with WHM, a cPanel account for each client and private nameservers on your own domain, with unlimited bandwidth. They run LiteSpeed on NVMe storage, on servers in Germany, with 7 daily backup copies.