Hosting Custom Nameservers on Dedicated Server's WHM

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
Hello,
1) My nameserver's domain is registered on GoDaddy. Let's say mydomain.com
2) On GoDaddy I've created ns1 and ns2 and pointed to IP addresses on my dedicated server
ns1.mydomain.com -> 123.456.789.111
ns2.mydomain.com -> 123.456.789.112

123.456.789.111 & 123.456.789.111 ar dedicated IPs on my dedicated server.

3) On my dedicated server's WHM I've added A records for these domains
Home / Server Configuration / Basic WebHost Manager® Setup

I can see A record for ns1.mydomain.com & ns2.mydomain.com in DNS edit as well.

ping ns1.mydomain.com doesn't return anything so it doesn't seem to work.

Let me know what did I miss?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,561
2,610
363
cPanel Access Level
Root Administrator
Hey there! There's three options that could be happening here.

Option 1 - the "add A records for your nameservers" tool created separate DNS zones for the nameservers, causing confusion. You'll want to check the DNS zones on the system, and if that did happen, remove the extra zones and add the A records to the main mydomain.com zone file.

Option 2 - Just because the nameservers point here, doesn't mean the DNS for mydomain.com does. You'll need to create the A records wherever the DNS for mydomain.com is handled.

Option 3 - Everything is working fine, and you just need to give the DNS changes some time to propagate. You could confirm the DNS is working on your machine with the following command:

Code:
dig ns1.mydomain.com @x.x.x.x
It's important to note that the test for Option 3 would not override the situation presented in Option 1.

Let me know if that helps as one of those will help to get things working.
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
Hey there! There's three options that could be happening here.

Option 1 - the "add A records for your nameservers" tool created separate DNS zones for the nameservers, causing confusion. You'll want to check the DNS zones on the system, and if that did happen, remove the extra zones and add the A records to the main mydomain.com zone file.
Yes that may be the case. I see SOA, NS, MX, CNAME and other A rercords such as cpanel.ns1.mydomain.com, whm., webmail. etc.
Do I need to remove all other records and just keep one A record for ns1.mydomain.com?
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
Hey there! There's three options that could be happening here.
Option 2 - Just because the nameservers point here, doesn't mean the DNS for mydomain.com does. You'll need to create the A records wherever the DNS for mydomain.com is handled.
I'm not sure if I need to create A records for mydomain.com. I've another nameservers setup where there is no A record for myotherdomain.com and yet is working.
Host names ns1.mydomain.com and ns2.mydomains.com are already setup so I guess this is what we need to setup properly to get it all working?
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
You wouldn't need to remove the other records. Having a unique DNS zone is fine, but not if there is already a separate zone for just mydomain.com, as that can lead to confusion.
Ok so I found that there was DNS entry for mydomain.com which I just deleted.

Following is dig's output

$ dig ns1.mydomain.com @123.456.789.111

; <<>> DiG 9.10.6 <<>> ns1.mydomain.com @123.456.789.111
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39381
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ns1.mydomain.com. IN A

;; ANSWER SECTION:
ns1.mydomain.com. 14400 IN A 123.456.789.111

;; AUTHORITY SECTION:
ns1.mydomain.com. 86400 IN NS ns2.ip-14-16-121.eu.
ns1.mydomain.com. 86400 IN NS ns1.ip-14-16-121.eu.

;; Query time: 37 msec
;; SERVER: 123.456.789.111#53(123.456.789.111)
;; WHEN: Thu Sep 08 15:35:09 BST 2022
;; MSG SIZE rcvd: 113
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
If that's the right IP, it looks like you're all set!
IP is correct

$ ping ns1.mydomain.com
ping: cannot resolve ns1. mydomain.com: Unknown host

$ ping 123.456.789.111
PING 123.456.789.111 (123.456.789.111): 56 data bytes
64 bytes from 123.456.789.111: icmp_seq=0 ttl=51 time=23.767 ms
64 bytes from 123.456.789.111: icmp_seq=1 ttl=51 time=19.356 ms
64 bytes from 123.456.789.111: icmp_seq=2 ttl=51 time=17.416 ms
64 bytes from 123.456.789.111: icmp_seq=3 ttl=51 time=19.477 ms
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,561
2,610
363
cPanel Access Level
Root Administrator
That could just be propagation. With all the recent changes it's hard to tell for sure.

Do you have any domains pointed to those nameservers yet? If so, you could use a tool like intodns.com to do a more thorough scan.
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
I think I may have found the issue. On GoDaddy nameservers for mydomain.com was set to ns1.mydomain.com & ns2.mydomain.com. I've set it to be GoDaddy's default nameserver now. I hope this change will work now?
I've to wait for propagation so can't tell right now if it works.
 
  • Like
Reactions: cPRex

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
I think I may have found the issue. On GoDaddy nameservers for mydomain.com was set to ns1.mydomain.com & ns2.mydomain.com. I've set it to be GoDaddy's default nameserver now. I hope this change will work now?
I've to wait for propagation so can't tell right now if it works.
It didn't work after setting mydomain.com nameserver to be GoDaddy's default nameservers.
ping ns1.mydomain.com returns:

ping: cannot resolve ns1.mydomain.com: Unknown host
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,561
2,610
363
cPanel Access Level
Root Administrator
At this point dealing in hypotheticals isn't going to work (meaning, not being able to see the domain and full configuration and server access). If you put in a ticket, and we said you need to poke GoDaddy about the issue, that's going to be the best plan.
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
At this point dealing in hypotheticals isn't going to work (meaning, not being able to see the domain and full configuration and server access). If you put in a ticket, and we said you need to poke GoDaddy about the issue, that's going to be the best plan.
Already wasted 3 days with your support and GoDaddy. No one knows what is wrong or how to fix.
 

CharlesGLondon

Well-Known Member
Jan 30, 2019
54
5
8
London
cPanel Access Level
Website Owner
Hello, It still doesn't seem to work. I've added A records on GoDaddy for my custom nameservers. I can now ping to these nameservers. I've used these nameservers for a domain. I can't ping this domain.
I've sent you private message.