• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved List all domains in Plesk that do _not_ point their A record to the server Plesk is installed on.

nilsringersma_nl

Basic Pleskian
Dear all,

Using: Plesk Onyx for Linux
OS: CentOS7

When adding a domain that does not point it's A record for @ to the server, Plesk will show a message about the DNS not pointing to the server.

Would it be possible to use the same mechanism to generate a list of all domains in Plesk Onyx that do not point to the server? Or can I not use Plesk for this and should I write something myself?

Any help or tips are appreciated, thanks in advance!
 
Check if this is enough?

#plesk db
mysql> select displayHost, val from dns_recs where type="A" and val <> 'xx.xx.xx.xx';

Where xx.xx.xx.xx is IP of your Plesk server.
 
Check if this is enough?

#plesk db
mysql> select displayHost, val from dns_recs where type="A" and val <> 'xx.xx.xx.xx';

Where xx.xx.xx.xx is IP of your Plesk server.

Hi IgorG,

Thanks for your reply and assistance!

Sadly we do not use the integrated DNS within Plesk, but DNS records are stored on an external nameserver. Therefor the table dns_recs returns an empty set.

I thought because Plesk initially shows the "Your domain does not point to <server_ip>" message after adding a domain to Plesk, it could be possible to dig from Plesk to show the actual A record for it's domains. But maybe I should try to generate a list of domains and then write a bash script to check their A records. Or do you have a better idea?

Thanks again :), much appreciated!
 
With command like

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do dig $i A +short; done

you will get only IPs of domain's A records.

But with command like

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do dig $i A +nostats; done

you will get more information :)
 
With command like

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do dig $i A +short; done

you will get only IPs of domain's A records.

But with command like

# for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do dig $i A +nostats; done

you will get more information :)

That's exactly what I was looking for! Thank's again Igor :)!
 
Back
Top