Every Domain its own Nameserver

caylean

Active Member
Jul 2, 2013
27
0
1
cPanel Access Level
Root Administrator
Hello together,

it seems like I am seraching for the wrong Subjects or i really don't know, but I'll try to explain, maybe one of you an help me.

I have a dedicated Server with 100+ c-Classes, so called SEO Server.
At the Moment i have running all my Domains on one single Nameserver, the default two of my Domainregistrar nsX.nldns.net

Now some talks to other Webbies and they told me that they would use Namecheap and they can use for each Domain an own Nameserver. Running just on One IP instead of two, but they do use the IP of the Server where is the Domain Located.

Domain: testdomain.com || IP: 1.2.3.4
ns1.testdomain.com || IP: 1.2.3.4
ns2.testdomain.com || IP: 1.2.3.4

Using WHM as Server, just a different Domainregistrar.

What do i have to do to get the Server also let the Domains run as their own Nameserver? I had already Problems getting the first default one set up so better this time really checking what to do.

Note from Namecheap.com: Once you have your nameservers registered, please do not forget to create the corresponding A records for them in your domain name zone file. This can be done in DNS or Zone Management menu of your hosting control panel. You might need to contact your hosting company for assistance with setting up the records.

Any ideas?

Kind Regards
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Domain: testdomain.com || IP: 1.2.3.4
ns1.testdomain.com || IP: 1.2.3.4
ns2.testdomain.com || IP: 1.2.3.4
Yes, You can use same IP for your domain and your both nameserver. But I will suggest you it's better to use different IP for your second name-server


Code:
Domain: testdomain.com || IP: 1.2.3.4
ns1.testdomain.com || IP: 1.2.3.4
ns2.testdomain.com || IP: 1.2.3.5
- - - Updated - - -

And yes, You will have to add "A" record of your name-server with the correct IP on your server under the domain name zone file
 

caylean

Active Member
Jul 2, 2013
27
0
1
cPanel Access Level
Root Administrator
Thank you,
but it seems like my little Domainregistar isn't able to run the Domains directly as Nameserver, he has to register them somehow. So i first need to get here a fix, before i can proceed.

Kind Regards
 

caylean

Active Member
Jul 2, 2013
27
0
1
cPanel Access Level
Root Administrator
Thank you Michael.

I have now the chance to try it on a running system. New Domain ordered with Namecheap (Sadly our old registrar is unable to create private Nameservers for our Domains so i will have to more ~1300 Domains, :eek: )

In that order all was done, should do maybe next time the server steps first.
Created new Account on the Server + IP Change.
Created with Namecheap the private Nameservers by following their Demo Video.
Added the ns1/ns2 Entry as A Record under "Edit DNS Zone" for the Account.
Change existing Domain Name Server Information is set to the created Nameserver ns1/ns1.domain.tld and was saved successfully.
Waiting up to 24h if it is all fine.

So far it seems i still have to wait. Just 2 hours ago all was done.

In the time between i have made a change in the Zone Templates where i would like to ask if that would be correct.

Code:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@      %nsttl%	IN      SOA     %nameserver%. %rpemail%. (
		%serial%	; serial, todays date+todays
		86400		; refresh, seconds
		7200		; retry, seconds
		3600000		; expire, seconds
		86400 )		; minimum, seconds

%domain%. %nsttl% IN NS %nameserver%.
%domain%. %nsttl% IN NS %nameserver2%.
%domain%. %nsttl% IN NS %nameserver3%.
%domain%. %nsttl% IN NS %nameserver4%.

%nameserverentry%. IN A %nameservera%
%nameserverentry2%. IN A %nameservera2%
%nameserverentry3%. IN A %nameservera3%
%nameserverentry4%. IN A %nameservera4%

%domain%. IN A %ip%

localhost.%domain%. IN A 127.0.0.1

%domain%. IN MX 0 %domain%.

mail IN CNAME %domain%.
www IN CNAME %domain%.
ftp IN CNAME %domain%.
[B]ns1 IN A %ip%
ns2 IN A %ip%[/B]
Are the last two 'Steps' fine like that, or should i put them higher? Maybe there is something important to take care about.

Kind Regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I do not recommend editing the zone template. You can configure the default name servers for new accounts via:

"WHM Home » Server Configuration » Basic cPanel & WHM Setup"

There is no need to add an "A" record for NS1/NS2 on every new domain name unless you plan for each domain name to create their own name servers. If that is the case, then the last two entries in that zone template are okay in that location.

Thank you.