How to Query All Domains and Return the Resolved IPs for cPanel WHM Servers

This article provides a guide for how to query all domains and return the resolved IPs for cPanel WHM servers.

How to Query All Domains and Return the Resolved IPs for cPanel WHM Servers

To query all domains and return the resolved IPs, follow the steps below:

  1. Login via SSH as root.
  2. Run the following command:
    awk -F : {'print $1'} /etc/userdatadomains | grep -v nobody | while read x; do echo "checking $x"; echo "$x resolves to $(dig +short $x)"; echo; done > resolvedips.txt
  3. The output will be displayed in the console.

Conclusion

You now know how to query all domains and return the resolved IPs for cPanel WHM servers.

  • ip address, dns, dns server, cpanel, cpanel guides
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Guide to Domain EPP Status Codes

EPP Status Codes are used by the Domain Registry to signify the status of a particular domain...

Addon Domain Vs Alias Domain

The table below lists some key characteristics of Addon Domain and Alias Domain....

Disable Network Manager on CentOS 7

This article will provide the steps to disable Network Manager in CentOS 7. Network Manager is...

Disable Network Manager on CentOS 6

This article will provide the steps to disable Network Manager in CentOS 6. Network Manager is...

Video: How to Setup Domain Redirects in cPanel

This video tutorial provides Step-by-Step instructions how to setup domain redirects in cPanel...