While creating a new domain/subdomain/alias for a domain on the Plesk panel getting following error:
This DNS record already exists
To fix this issue, follow the below steps:
1) Connect to the Plesk Windows server via RDP.
2) Take a database dump of the Plesk database using the following command under the command prompt (Start CMD as an Administrator).
plesk db dump psa > C:\psa_24x7_backup.sql
3) Access the Plesk database using the following command in CMD:
4) Find dns_zone_id of the domain, which cannot be created, using the following command.
select dns_zone_id,host from dns_recs where host like "%aicp.ir%"; aicp.ir is domain name
Replace aicp.ir with your actual domain name:
5) Using dns_zone_id from the output above, make sure that the domain name is the same:
select id,name from dns_zone where id=628;
6) Delete records from corresponding tables using the ID from the steps above
delete from dns_zone where id=628;
delete from dns_recs where dns_zone_id=628;
Now, you will able to create the domain/subdomain/alias in Plesk without any issue.