An attempt to create a new domain or migrate existing one fails and the following error is shown:
DNS records for domain with such name already exist
The subdomain with such name already exists
This DNS record already exists
A DNS record for the domain already exists in Plesk database, so a new domain with the same name cannot be added.
Try to fix this error in automatic mode using Plesk repair utility that is available in Plesk 12.5 and Plesk Onyx:
plesk repair db
Note: Do not accept all the suggestions blindly.
If the issue persists, try finding a record with a similar name in the DNS settings of the existing domains.
- Back up Plesk database according to the article.
Open Plesk database:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa
Refer to this article: #213928465 How to access Plesk database
Run the following query to find the DNS record preventing the new domain creation (replace "example.com" with the real name of the domain you are trying to create)
mysql> select * from dns_zone where displayname like '%example.com%'\G
And remove the found record using its ID:
mysql> delete from dns_zone where id=<id_from_previous_select>;
Select all the records with desired domain name:
mysql> select * from dns_recs where host like '%example.com%';
Make sure that no any other domain is selected and remove these records:
mysql> delete from dns_recs where host like '%example.com%';
- Try to create a domain again.