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
[3 Apr 17 13:40:56] [Migration] The name of alias 'aliase.example.com' in this subscription conflicts with the name of alias '
' which already exists in a subscription 'None'
Change the conflicting names before migrating.
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 persits, try finding a record with a similar name in the DNS settings of the existing domains.
- Backup Plesk database according to How to backup/restore a Plesk database dump?
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 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.