Can I set alias NS1 NS2 for a second domain ?

taotoon

Well-Known Member
Nov 14, 2004
135
1
166
Can I use multiple nameservers with 1 IP ?

My VPS server is server.domain1.com

ns1.domain1.com = 123.123.123.1
ns2.domain1.com = 123.123.123.2



I add a second account domain2.com ( no reseller ).
How do I setup their private nameservers ?

ns1.domain2.com to 123.123.123.1
ns2.domain2.com to 123.123.123.2
 
Last edited:

bking

Well-Known Member
Mar 1, 2004
206
1
168
Sydney
Are you asking if you should use a CNAME for a nameserver? I wouldn't. Just create two new A records pointing to the same IPs
 

taotoon

Well-Known Member
Nov 14, 2004
135
1
166
I modified for each domain one by one as format below and they work!!!!!!!!!!!

Code:
; Modified by Web Host Manager
; Zone File for domain2.com

$TTL 14400
@ 14400 IN SOA  ns1.domain2.com.  client2.yahoo.com.  (
                                   ...
                                   ...
                                                     )

domain2.com.              14400 in  NS     ns1.domain2.com. 
domain2.com.              14400 in  A      123.123.123.002
localhost.domain2.com.    14400 in  A      127.0.01
domain2.com.              14400 in  MX     0  domain2.com. 
mail                      14400 in  CNAME  domain2.com. 
www                       14400 in  CNAME  domain2.com. 
ftp                       14400 in  CNAME  domain2.com. 
ns1                       14400 in  A      123.123.123.1
 
Last edited:

Buddah

Registered
Jul 15, 2005
2
0
151
taotoon said:
I modified for each domain one by one as format below and they work!!!!!!!!!!!

Code:
; Modified by Web Host Manager
; Zone File for domain2.com

$TTL 14400
@ 14400 IN SOA  ns1.domain2.com.  client2.yahoo.com.  (
                                   ...
                                   ...
                                                     )

domain2.com.              14400 in  NS     ns1.domain2.com. 
domain2.com.              14400 in  A      123.123.123.002
localhost.domain2.com.    14400 in  A      127.0.01
domain2.com.              14400 in  MX     0  domain2.com. 
mail                      14400 in  CNAME  domain2.com. 
www                       14400 in  CNAME  domain2.com. 
ftp                       14400 in  CNAME  domain2.com. 
ns1                       14400 in  A      123.123.123.1
I'm really new to this, so call me a nub if you'd like lol. How does it know that you own 'domain2.com'? Reason for my question, I currently have a dedicated server, but can only use the IP's. My domain only allows me to add name servers, not IPs. So I don't know how the WHM would know if you own the domain, and how it would work. Can someone explain to me how that works?
 

taotoon

Well-Known Member
Nov 14, 2004
135
1
166
I am not good in english.

Where did you registered your domain name ? ( ex. network solution, tucows, godady...etc ) They must have DNS setting for your own private DNS.


The owner of domain ---> set DNS at registra ---> IP of DNS point to your server ------>
your server setup IP <-> domain name
 

Buddah

Registered
Jul 15, 2005
2
0
151
I registered my domain @ hostgator.com. It was a bad idea, but I did it. Lol. There's no options on their domain control panel.
 

aykfounder

Well-Known Member
Feb 22, 2004
102
0
166
Yeah, you need to register a new DNS with them in order for you to use Private nameservers. Well, I mean, your customer needs to. Then go to DNS Edit Zone in WHM and create an A record for it.
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
If I understand the conversation here right, we talking about setting private name server for each domain added.
AFAIK the following steps would be required for this to work:
1. Register Child Name Servers at the domain registrar :
ns1.domain.tld ---> 11.11.11.11 (name server ip 1)
ns2.domain.tld ---> 22.22.22.22 (name server ip 2)
2. Modify Name servers at the Domain registrar to point at
ns1.domain.tld
ns2.domain.tld
3. Edit the DNS zone of the (domain.tld) or change your zone template as follows: (if you wish to have private name servers for all domains added in future)
Code:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@      IN      SOA     ns1.%domain%. hostmaster.%domain%. (
		%serial%	; serial, todays date+todays
		7200		; refresh, seconds
		2400		; retry, seconds
		2419200		; expire, seconds
		3600 )		; minimum, seconds

%domain%. IN NS ns1.%domain%.
%domain%. IN NS ns2.%domain%.
%domain%. IN TXT "v=spf1 a mx ptr"
%domain%. IN A %ip%
%domain%. IN MX 0 %domain%.
ns1 IN A %ip%
ns2 IN A %ip%
mail IN A %ip%
www IN A %ip%
ftp IN A %ip%
localhost.%domain%. IN A 127.0.0.1
The third step is only required once if you are changing your ZONE Template file, else you have to edit the domain Zone each time you add a new domain which requires private name server.
 
Last edited: