I have a domain: example.com and have a server with IP

I set vanity/private/child nameservers for example.com as below:

ns1.example.com with IP
ns2.example.com with IP

And in server's WHM I set NS as below:
then I hosted example.com in WHM of my server.

Now, I got my second server with IP I don't know how to set vanity/private/child nameservers for example.com for this second server! And I want to use my second server for hosting customers.

  1. Should I set NS3 and NS4 for this new server with settings:
    ns3.example.com with IP
    ns4.example.com with IP

  2. I can use multiple IP for domain NS, Should I set:
    ns1.example.com with IPs &
    ns2.example.com with IPs &
    So I get rid of NS3, NS4...?

I am confused with NS of domain and server, Any help please?


Name servers are not for hosting anything; they just resolves human readable domain names to IP addresses. You should have always had at least two name servers on separate networks. Therefore, neither of your suggestions meets the minimum technical requirements for authoritative name servers. You should read the whole article, but the related parts are these:

Minimum number of name servers

There must be at least two NS records listed in a delegation, and the hosts must not resolve to the same IP address.

Network diversity

The name servers must be in at least two topologically separate networks. A network is defined as an origin autonomous system in the BGP routing table. The requirement is assessed through inspection of views of the BGP routing table.

The only acceptable solution would be to have all the domains on both name servers, the other being primary and allowing zone transfers from the secondary. If example.com is your domain and example.net customers domain, that would be e.g.

example.net.     IN NS  ns1.example.com.
example.net.     IN NS  ns2.example.com.

example.com.     IN NS  ns1.example.com.
example.com.     IN NS  ns2.example.com.
ns1.example.com. IN A
ns2.example.com. IN A

After this you should fix all the other requirements starting from all the consistensies. You really should learn all this and have it all together with your own domain before trying to sell these services to anyone else. Seriously.


DNS records are organised in zones. One zone contains the records for one domain. If there are few records and subdomains, it might also contain the subdomains, but usually those get separate zones.

A zone can have various NS records and they can be domain specific, but every zone has one SOA record (Start of Authority), which, among other information lists the primary name server for the zone.

Assuming your domain is mydomain.com and your customer has customerdomain.com:

There's no point in having two NS records that ultimately point to the same IP-Address. Multiple name serverse are for redundancy, which you won't get that way. Also, it's good practice to have the primary NS server outside the domain it serves. So you'll set ns1.mydomain.com as either the first or second name server, depending on whether you prefer best practice over appearances or not.

For customerdomain.com, you set ns2.mydomain.com to your second DNS server, and set it as the authoritative DNS server for customerdomain.com.

That is, if you want those domains served by separate servers. For redundancy, it's probably best to have both zones on the same server, have ns1.mydomain.com point to the first, ns2.mydomain.com to the seconde and set a NS record to both of them for each zone.

  • Thank you, My first server's panel is WHM/cPanel and it needs two NS. Should I use ns1.mydomain.com & again ns1.mydomain.com for WHM/cPanel (duplicate ns)? – user3252522 Jun 19 '17 at 17:56
  • Just a hint: cPanel and WHM are out of the scope of serverfault and questions about their configuration will get your question closed. To answer the general part of your question: if both your nameservers (i.e. & are capable of hosting both domains/zones, set ns1.mydomain.com to point to one of them and ns2.mydomain.com to point to the other and add both to both mydomain.com and customerdomain.com as NS record. – PaterSiul Jun 19 '17 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.