π₯οΈ Scope: Plesk Obsidian 18.x (Windows Server 2016/2019/2022) with Microsoft DNS.
π Applies to: Adding a domain, sub-domain, or domain alias that fails with:Unable to create the domain example.com because a DNS record pointing to the host example.com already exists.
π§ 1. Why This Happens
π Root Cause | π Database Table | β οΈ Symptom |
---|---|---|
Orphaned DNS zone left after deletion | dns_zone |
Domain isnβt listed in Websites & Domains, but SELECT id FROM dns_zone WHERE name='example.com'; returns a result. |
Duplicate DNS record exists | dns_recs |
A or CNAME record for the same hostname (e.g., multiple www records) causes conflict. |
Domain alias still present | dom_aliases |
SELECT name FROM dom_aliases WHERE name='example.com'; returns a row; domain can't be added again. |
Domain is under another subscription | domains |
Domain exists in a hidden or forgotten subscription; must be removed or renamed first. |
π The Plesk GUI only shows domains under active subscriptions. PSA database entries outside of that still block new domains.
π Official Plesk Article
π‘οΈ 2. Prerequisites & Safety First
β
Admin access via RDP to the Plesk server
β
Plesk CLI tools available in PATH (%plesk_bin%
) or via full path
β
Backup the PSA database before making changes:
plesk db dump psa > C:\psa_before_dns_cleanup.sql
πΊοΈ 3. Fast-Track Flowchart
βββββββββββββββ
β Add domain? β
βββββββ¬ββββββββ
βΌ
Check orphaned zone: SELECT id FROM dns_zone...
βΌ
If zone exists β Try: dns.exe --del-all
βΌ
Fails? β DELETE FROM dns_zone...
βΌ
Check dom_aliases
βΌ
Delete alias β Add domain β β
π‘ Skip to Section 5 for CLI-based removal.
π±οΈ 4. Fixing Through the GUI (For Simple Cases)
π§ Check existing DNS zone records:
Go to Websites & Domains β example.com β DNS Settings β Remove duplicate A/CNAME records.
β Check Domain Aliases:
Websites & Domains β Domain Aliases β Find example.com
β Remove.
β Re-add the domain: Only use apex (example.com
). Plesk auto-creates the www
alias.
π Still seeing the error? Move on to the CLI cleanup.
π οΈ 5. Deep Dive β Resolve Conflict via CLI
π Always use elevated Command Prompt (cmd.exe) and quote paths containing spaces.
π 5.1 Check if Zone Exists
plesk db "SELECT id FROM dns_zone WHERE name='example.com';"
If a row is returned, proceed to remove the zone.
β 5.2 Attempt to Wipe Records
"%plesk_bin%\dns.exe" --del-all example.com
If successful: β Zone wiped.
If this fails (returns unknown parameter or does nothing), skip to 5.3.
ποΈ 5.3 Delete the Entire Zone via SQL (Guaranteed Fix)
plesk db "DELETE FROM dns_zone WHERE name='example.com';"
π 5.4 Refresh DNS Config
"%plesk_bin%\dnsmng.exe" update *
π 5.5 Check & Remove Domain Aliases
plesk db "SELECT name FROM dom_aliases WHERE name='example.com';"
"%plesk_bin%\domalias.exe" --delete example.com
β 5.6 Re-Add the Domain
Go to Websites & Domains β Add Domain:
-
Domain name: example.com
-
DNS service: β Enabled
βοΈ Confirm DNS Records:
-
A
βexample.com
β IP -
CNAME
orA
βwww
βexample.com
β Done!
π§© 6. Special Cases & Troubleshooting
π 6.1 External DNS Sync
Disable zone sync temporarily if syncing from a slave server to avoid auto re-creation.
π΅οΈ 6.2 Check for Hidden Subscriptions
plesk db "SELECT name,id FROM domains WHERE name='example.com';"
If found, remove or rename domain in that subscription.
π οΈ 6.3 Still Failing? Try Plesk Repair Tool
plesk repair dns example.com -y
Or if needed:
plesk repair all -y
π‘ 7. Best Practices to Prevent This Error
β
Always add apex domain (example.com
) first. Plesk auto-creates www
, mail, and related records.
β
Use the GUI to remove domains & aliases when possible β this clears all dependencies.
β
Run regular cleanup checks:
"%plesk_bin%\dbclient.exe" --direct-sql --sql="SELECT name FROM dns_zone dz LEFT JOIN domains d ON d.dns_zone_id = dz.id WHERE d.id IS NULL;"
β Track subscription ownership to avoid ghost records.
β 8. FAQ
Q: Can I reset instead of deleting a zone?
A: dns.exe --reset example.com -ip x.x.x.x
only works for zones tied to active domains. For orphans, SQL deletion is required.
Q: Is the process different on Linux?
A: Same logic applies; use plesk bin dns
instead of dns.exe
, and Linux will use BIND instead of MS DNS.
Q: Will this break DNS temporarily?
A: Yesβonly proceed if it's safe to reset or recreate the zone immediately.
π 9. References
π Plesk CLI β dns.exe β Windows DNS zones
π Plesk CLI β domalias.exe β Domain Aliases
π Plesk Support β DNS record already exists error
π¬ Need further help? Submit a support ticket and weβll assist you right away.
Β