The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can I set alias NS1 NS2 for a second domain ?

Discussion in 'General Discussion' started by taotoon, Jul 2, 2005.

  1. taotoon

    taotoon Well-Known Member

    Joined:
    Nov 14, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    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
     
    #1 taotoon, Jul 2, 2005
    Last edited: Jul 2, 2005
  2. bking

    bking Well-Known Member

    Joined:
    Mar 1, 2004
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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
     
  3. taotoon

    taotoon Well-Known Member

    Joined:
    Nov 14, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    How should I Do ?
     
    #3 taotoon, Jul 2, 2005
    Last edited: Jul 2, 2005
  4. taotoon

    taotoon Well-Known Member

    Joined:
    Nov 14, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    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
    
     
    #4 taotoon, Jul 2, 2005
    Last edited: Jul 2, 2005
  5. Buddah

    Buddah Registered

    Joined:
    Jul 15, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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?
     
  6. taotoon

    taotoon Well-Known Member

    Joined:
    Nov 14, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  7. Buddah

    Buddah Registered

    Joined:
    Jul 15, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  8. aykfounder

    aykfounder Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  9. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
    #9 Zaf, Sep 22, 2005
    Last edited: Sep 22, 2005
Loading...

Share This Page