Symptoms
-
It is not possible to delete NS record if it has no A record:
# plesk bin dns –add example.com -ns ” -nameserver ns2.example.com
SUCCESS: Creation of DNS record in Domain ‘example.com’ complete.# plesk bin dns –del example.com -ns ” -nameserver ns2.example.com
Inconsistent zone “example.com”: The NS record “example.com. IN NS ns2.example.com.” has no address records (A or AAAA). -
It is not possible to set less NS records via CLI then currently exist:
# plesk bin dns –set example.com -list “NS,,ns1.example.com;A,ns1,203.0.113.2;”
Inconsistent zone “example.com”: The NS record “example.com. IN NS ns2.example.com.” has no address records (A or AAAA).
Cause
Product issue:
-
#PPPM-9653 “Removing a DNS record causing an inconsistency in a DNS zone no longer fails.”
Fixed in:- Plesk Onyx 17.8 20 January 2020
- Plesk Obsidian 04 June 2019 (fixed as PPP-39511)
Resolution
Workaround
To remove unwanted NS records follow the steps:
Through Plesk
-
Go to Domains > example.com > DNS Settings;
-
Add corresponding A record via Add Record. Update the changes;
-
Remove the required NS record (without its A record). Update the changes;
Note: It is not possible to remove last NS record for a domain. At least one NS record should be present.
-
(Optional) Remove corresponding A record if required.
Via CLI
-
Connect to the server via SSH;
-
Add corresponding A record for NS record that is planned to be removed:
# plesk bin dns –add example.com -a ‘ns2’ -ip 203.0.113.2
SUCCESS: Creation of DNS record in Domain ‘example.com’ complete. -
Remove the not required NS record:
# plesk bin dns –del example.com -ns ” -nameserver ns2.example.com
SUCCESS: Removal of DNS record in Domain ‘example.com’ complete.Note:Â It is not possible to remove last NS record for a domain. At least one NS record should be present.