Search for domains with DNS hosted elsewhere?

123Host

Member
Apr 24, 2015
18
0
1
Australia
cPanel Access Level
Root Administrator
I am migrating my server using the transfer tool. There may be some domains where DNS is hosted elsewhere and an A record points to current IP address. Obviously the migration will break those sites if A Record isn't updated.

Is there a tool to determine which domains have nameservers pointing elsewhere?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,096
47
178
Finland
cPanel Access Level
Root Administrator
I am migrating my server using the transfer tool. There may be some domains where DNS is hosted elsewhere and an A record points to current IP address. Obviously the migration will break those sites if A Record isn't updated.

Is there a tool to determine which domains have nameservers pointing elsewhere?
I have used this tool, but not recently so not sure if it still works:
 

123Host

Member
Apr 24, 2015
18
0
1
Australia
cPanel Access Level
Root Administrator
I have used this tool, but not recently so not sure if it still works:
Thanks for that. I had already found it earlier today and it is useful to find orphaned domains.

But it doesn't do what I am after which is find a domain where the A Record points to my server, but the nameservers are elsewhere.

Unless I am missing something :P
 

quietFinn

Well-Known Member
Feb 4, 2006
1,096
47
178
Finland
cPanel Access Level
Root Administrator
Thanks for that. I had already found it earlier today and it is useful to find orphaned domains.

But it doesn't do what I am after which is find a domain where the A Record points to my server, but the nameservers are elsewhere.

Unless I am missing something :P
Right, that tool would work after the transfer, in the new server...
 
  • Like
Reactions: 123Host

quietFinn

Well-Known Member
Feb 4, 2006
1,096
47
178
Finland
cPanel Access Level
Root Administrator
I have always done that manually, i.e. in WHM -> DNS Functions -> Nameserver Record Report you get a list of all nameservers that are used, and when you click Edit Zones you get a list of domains using those nameservers. Then I make a list of customers that need to be informed.
 
  • Like
Reactions: cPanelLauren

123Host

Member
Apr 24, 2015
18
0
1
Australia
cPanel Access Level
Root Administrator
I have always done that manually, i.e. in WHM -> DNS Functions -> Nameserver Record Report you get a list of all nameservers that are used, and when you click Edit Zones you get a list of domains using those nameservers. Then I make a list of customers that need to be informed.
I appreciate your suggestions but this doesn't work as a domain may have been automatically added to DNS even though the nameservers are pointing elsewhere. So in the zone file the nameserver will say my server but that won't be the active zone file, that is located where the nameservers are actually pointing.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,921
134
368
SLC
cPanel Access Level
DataCenter Provider
just check with a bash script quick example below
you will want to run for /etc/remotedomains ( users who use remote MX ) as well
Note if you have a lot of dead domains (EXPIRED) & you don't want to wait forever for the whois command to time out Just install jwhois and set a timeout

It wont be perfect but used in conjunction with Account DNS Check cPanel/WHM plugin you should get most of them




Code:
#!/bin/bash
yes | rm  dns
domain_list="/etc/localdomains"

while read line
do
    name=$line
     echo "Looking up ${line}..."
     echo ============ >> dns
     echo  $name >> dns
     whois $name | grep  "Name Server" >> dns
    sleep 1
done < $domain_list
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,421
689
263
Houston
cPanel Access Level
DataCenter Provider
I would also recommend opening a feature request [https://go.cpanel.net/features] for {the feature that is being requested}.

Please use the following format when creating the request to ensure your idea gets as much visibility as possible and translates into actionable work:

==============

As a {cPanel User, System Administrator, web-hosting provider, or any other user perspective}, I would like {the feature that is being requested} so that {benefit that the request adds to the product}.

==============

Feel free to respond here with a link to the feature request upon approval so others can easily vote on it as well.

Thank you.