Applicable to:
- Plesk Onyx for Linux
Symptoms
When creating a new domain alias, the operation fails with the following error message in Plesk (in this example, domain alias example.net for example.com):
PLESK_ERROR: Error: Unable to add the ipv4.example.net. IN A 203.0.113.2 record to zone example.net: DNS record already exists.
Cause
The domain, for which a domain alias is created, contains duplicate DNS records.
In this example, there is a duplicate DNS entry for example.com that points to the same IP address 203.0.113.2 at Domains > example.com > DNS Settings.
Resolution
-
Go to Domains > example.com > DNS Settings.
-
Select the duplicate DNS entries and remove them.
Note: If the domain's DNS zone is hosted externally (only NS records are shown), see the solution below.
-
On the next page, click Update to apply the changes.
If the domain's DNS zone is hosted externally (only NS records are shown):
-
Connect to your Plesk server via SSH.
-
For safety reasons, create a backup of the Plesk system database:
# plesk db psa > /root/psa_dump.sql
-
Access Plesk database:
# plesk db
-
List duplicated entry mentioned in the error message for domain example.com (for which alias domain should be created):
MYSQL_LIN: MariaDB [psa]> select * from dns_recs where host='example.com.' and type='A'\G
*************************** 1. row ***************************
time_stamp: 2025-03-14 17:58:57
id: 83
dns_zone_id: 2
type: A
host: ipv4.example.com.
displayHost: ipv4.example.com.
val: 203.0.113.2
displayVal: 203.0.113.2
opt:
external_id:
ttl: NULL
*************************** 2. row ***************************
time_stamp: 2025-03-14 17:58:57
id: 96
dns_zone_id: 2
type: A
host: ipv4.example.com.
displayHost: ipv4.example.com.
val: 203.0.113.2
displayVal: 203.0.113.2
opt:
external_id:
ttl: NULL -
Delete the extra record using its ID:
MYSQL_LIN: MariaDB [psa]> DELETE FROM dns_recs WHERE id = 96;
Comments
1 comment
This error can occur if DNS for the (sub)domain is disabled. Enable DNS, delete the A and/or AAAA records, and disable DNS again.
Please sign in to leave a comment.