• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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