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
  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
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Remove a Service from ChkServd Monitoring for cPanel Servers

This guide requires root user account in server. In some circumstances, ChkservD cPanel...

How to Edit Zone File and Setup DNS Forwarding

To perform DNS forwarding, change your zone file, (MX, A-Records & CNAME) using the following...

Assigning a Dedicated IP Address to a Subdomain using WHM

To assign a dedicated IP address to a subdomain, perform the following steps: Step 1: Add the...

Update Nameservers for Domains Registered at GoDaddy

After signing up for a hosting account, you will receive a Welcome email containing important...

Guide to Domain EPP Status Codes

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