I cannot add a new domain because of existing DNS records
APPLIES TO:
- Plesk
Symptoms
An attempt to create a new domain fails and the following error is shown:
DNS records for domain with such name already exist
or
The subdomain with such name already exists
or
This DNS record already exists
Cause
A DNS record for the domain you are trying to add already exists in the Plesk database, so a new domain with the same name cannot be added.
Resolution
Try to find a record with a similar name in the DNS settings of the existing domains.
If it is difficult to find this manually:
- Open the "psa" database:Linux:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa
Windows:Refer to this article: #3472 [How To] How to access Parallels Plesk database - Run the following query to find the DNS record preventing new domain creation (replace "example.tld." with the real name of the domain you are trying to create)Note: Pay attention to the "." symbol at the end of domain name.Linux:
select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like 'example.tld.';
Windows:For MSSQL and MySQL DB provider:select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like 'example.tld.';
For MS Access DB provider:select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like 'example.tld.';
Example:
You try to create a domain called support.example.tld, but the above error appears. The above shell command returns the following output:
mysql> select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like 'support.example.tld.';
+-------------+-----------------------+------+----------------+
| name | host | type | val |
+-------------+-----------------------+------+----------------+
| mydomain.com| support.mydomain.com. | A | 192.168.45.200 |
+-------------+-----------------------+------+----------------+
You need to open the corresponding domain (mydomain.com in our example) in the Plesk web interface and examine its DNS zone for records that contain the name of the domain you tried to add. If you want to create thesupport.example.tld domain as a separate domain in Plesk, the existing record with a similar name has to be removed from the mydomain.com DNS zone.
Another possible cause:
A DNS record may exist in the
dns_recs
table, but have no Plesk domain associated with it. This may be because of a failed domain removal in the past. You can remove such records directly from the dns_recs
table using the following query:.
Note: Make sure you back up the
psa
database modifying it.
Linux:
DELETE FROM `dns_recs` WHERE DisplayHost LIKE 'support.example.tld.';
Windows:
For MSSQL and MySQL DB provider:
DELETE FROM `dns_recs` WHERE DisplayHost LIKE 'support.example.tld.';
For MS Access DB provider:
DELETE FROM `dns_recs` WHERE DisplayHost LIKE 'support.example.tld.';
Yorumlar
Yorum Gönder