Error: Unable to create the domain because a DNS record exists

Error:

Error message “Error: Unable to create the domain example.com because a DNS record pointing to the host example.com already exists.”

The error message is displayed when you add a domain from Plesk control panel and it fails. The reason it fails is because the DNS records of the domain already exist in the psa database. The tables dns_recs and dns_zone holds the DNS records for a domain.

In order to add the domain example.com, you will have to remove the DNS entries from the tables dns_recs and dns_zone.

1) Goto Mysql prompt:

root@host [~]# mysql -uadmin -p `cat /etc/psa/.psa.shadow`

2) Use the psa database

mysql>  use psa;

3) Remove the DNS entries from the dns_recs and dns_zone tables:

mysql> delete from dns_recs where dns_zone_id=10;
mysql> delete from dns_zone where id=10;

where, 10 is the dns_zone_id of the domain example.com.

4) Restart the mysql service:

root@host [~]# service mysqld restart

You should now be able to add the domain from Plesk control panel successfully.

This entry was posted on Saturday, November 28th, 2009 and is filed under Plesk Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “Error: Unable to create the domain because a DNS record exists”

  1. Geroge

    Helpful post.
    Just don’t know why to restart the mysql service. Plesk 8+ just make a query to the DB to check if the domain name exists.

    All the best!