Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have about 60 Domain Names That I Am Creating Private name Servers For. Is it possible for me to just point ns1.mydomain.com, ns1.mydomain2.com, ns1.mydomain3.com etc. to the same nameserver IP address through the DNS Zone Record for each domain? And if I can do that do I have to put the original nameserver domain name in the DNS Zone SOA or can i juts map it too ns1.mydomain.com? Does any of that make sense? Other wise I am going to create like 30 nameservers on this one machine. Also I am using all C-Class IPs. I don't want to create 30 nameservers on this one machine and waste precious IP addresses. Any tips?

Thanks in advance for your help.

I also forgot to mention that I am trying to keep the fact that these are all on the same server Private so the SOA record for each domain needs to point to its own nameserver not the domain name for the real nameserver.

share|improve this question

4 Answers 4

It is possible to have multiple A records pointing to the IP. It is also possible to have multiple NS records pointing to multiple A records with the same IP. From a management point of view this is a bit unwieldy. Future changes will be more difficult because you will have lots of places that you have to make lots of changes.

A much better idea is to create ns1.maindomain.com and have ns1.maindomain.com listed as the NS record for each domain. That is to have ns1.maindomain.com as the NS records for ns1.domain1.com, ns2.domain.com and so on.

share|improve this answer
    
So your saying that I should create seperate nameserver instances for each domain? Even though there all hosted on the same VPS. –  Joshua Riddle Feb 10 '11 at 17:24
1  
No Joshua I said the exact opposite. I've edited the answer to be more clear. –  Tarrant Feb 10 '11 at 17:33
    
Thanks For Your Input –  Joshua Riddle Feb 10 '11 at 17:40

You can point as many names as you want to an IP address. If you're creating nameservers within each domain (e.g. mydomain.com's nameservers are ns1.mydomain.com and ns2.mydomain.com) you will need to ensure that glue records are set up for those entries.

Alternatively you can set up one pair of nameserversm in a specific domain (say ns1.myhostingbusiness.com & ns2.myhostingbusiness.com) and use those as the NS entries for all your other zones. The difference is basically cosmetic (does it look like each of your domains hosts its own DNS, or is it obvious they all tie back to a central point).


My usual DNS plug -- Generally speaking any questions you have about DNS can be answered by reading the Cricket book (DNS & BIND) from O'Reilly.
If you're going to be setting up and hosting your own DNS I would consider this required reading - it will save you a lot of headaches.

share|improve this answer
    
So if I use DNS Zone entries pointing A records for ns1 such as ns1.domain.com and ns1.domain2.com to the same ip address: 67.12.34.567 which is really ns.mymaindns.com they will work properly?And then the SOA for each would be ns1.domian.com and ns1.domain2.com and you publically wont be able to tell they are pointing at the the same nameserver? Thats what I want to do. –  Joshua Riddle Feb 10 '11 at 17:35
    
Thanks for the Book info also... downloading now –  Joshua Riddle Feb 10 '11 at 17:43
    
yup -- the disadvantage of creating the NS in each domain is if (when) your IPs change you need to edit all your zones (and glue), but if you just pointed at ns1/ns2.maindomain.com you only have to edit one zone (and some glue) –  voretaq7 Feb 10 '11 at 18:12
    
Also what do you mean when you say glue records? Are you talking about the registrar info pointing to the right name server? –  Joshua Riddle Feb 10 '11 at 18:32
    
Wikipedia has a decent explanation of DNS glue (en.wikipedia.org/wiki/…), but the cricket book probably has a better one -- check the index (or if you grabbed an e-book just search for "glue" :) –  voretaq7 Feb 10 '11 at 18:36

As voretaq7 and Wergan have stated in their answers, not only can you point multiple A records from separate domains to the same ip addresses you can also point the name servers from multiple domains to a specific set of name servers.

domain1.com NS = ns1.domain_main.com

domain2.com NS = ns1.domain_main.com

share|improve this answer
up vote 0 down vote accepted

This is my conclusion from all the help and information given:

Actual Name Servers:

ns1.maindomainnameserver.com = 123.456.789.1
ns2.maindomainnameserver.com = 123.456.789.2

DNS Zone Entries:

Zone: domain1.com 
SOA is set to ns1.domain1.com
NS is set to ns1.domain1.com and ns2.domain1.com
A record ns1 = 123.456.789.1
A record ns2 = 123.456.789.2

Zone: domain2.com 
SOA is set to ns1.domain2.com
NS is set to ns1.domain2.com and ns2.domain1.com
A record ns1 = 123.456.789.1
A record ns2 = 123.456.789.2

Zone: Domain3.com (shares nameservers with domain2.com)
SOA set to ns1.domain2.com
NS is set to ns1.domain2.com and ns2.domain1.com

From what I have gotten from everybody, this should work and mask that domain1.com and domain2.com share the same nameservers. And in the end my WHM Nameservers List should only contain:

ns1.maindomainnameserver.com = 123.456.789.1 
ns2.maindomainnameserver.com = 123.456.789.2
share|improve this answer
    
Any and All feedback is and was appreciated! Thank You! –  Joshua Riddle Feb 10 '11 at 18:36
    
The only problem with this solution is I can still trace the name servers to a single IP. I was trying to make it where all the name servers apeared to be owned by different owners. Looks like I will have to create the name servers for each domain. –  Joshua Riddle Feb 11 '11 at 3:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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