Resolving the This DNS Record Already Exists Error in Plesk for Windows Print

  • 0

πŸ–₯️ 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 or A β†’ 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.

Β 


Was this answer helpful?

« Back