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

Posted by admin     Category: Plesk Management

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.

Tags: , , , , , , ,

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

  1. Geroge Says:

    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!

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image