This guide provides step-by-step instructions for manually removing a domain from DirectAdmin control panel when the standard removal methods are unavailable or not functioning properly. Manual domain removal involves accessing DirectAdmin's configuration files and database to completely eliminate all domain-related entries and data.
Before proceeding with manual domain removal, ensure you have root or admin access to the server and understand the risks involved.
| Requirement | Description |
|---|---|
| Server Access | Root or admin SSH access to the server |
| Backup | Complete server backup recommended |
| Domain Information | Exact domain name to be removed |
| Technical Knowledge | Basic command line and file editing skills |
| Service Management | Knowledge of starting/stopping web services |
WARNING! Manual removal can break your server if done incorrectly. Proceed with caution and always backup first.
Create comprehensive backups before making any changes to ensure data recovery is possible.
CAUTION! Without proper backups, data loss is permanent and irreversible.
Stop services to prevent conflicts during the removal process.
Service stop commands:
service httpd stop service exim stop service named stop service proftpd stop
Delete all domain-related files and directories from the server.
cd /usr/local/directadmin/data/users/[username]/domainsrm [domain.com].confrm -rf /home/[username]/domains/[domain.com]rm -rf /usr/local/directadmin/data/users/[username]/domains/[domain.com].keyrm -rf /home/[username]/backups/[domain.com]*WARNING! Double-check paths before deleting to avoid removing wrong domains.
Remove all database associations and user data related to the domain.
mysql -u root -pSHOW DATABASES LIKE '%domain%';DROP DATABASE [database_name];DROP USER '[db_user]'@'localhost';/usr/local/directadmin/data/users/[username]/user.confTip: Use FLUSH PRIVILEGES; after dropping users and databases.
Modify DirectAdmin configuration files to remove domain references.
Key files to update:
| File Path | Action Required |
|---|---|
| /etc/virtual/domains | Remove domain entry |
| /etc/virtual/domainowners | Delete domain ownership line |
| /etc/named.conf | Remove domain zone reference |
| /usr/local/directadmin/data/admin/ip_usage | Update IP allocation |
| /usr/local/directadmin/data/task.queue | Clear any pending domain tasks |
Restart all services to apply changes and ensure proper functionality.
service httpd restartservice exim restart && service dovecot restartservice named restartservice proftpd restartservice directadmin restartCAUTION! Verify all services start without errors before proceeding.
Confirm the domain has been completely removed from all systems.
| Check | Verification Method |
|---|---|
| Domain Access | Attempt to access domain via browser - should show error |
| DirectAdmin Panel | Verify domain no longer appears in user panel |
| DNS Resolution | Check domain does not resolve via nslookup |
| Email Function | Confirm email addresses no longer work |
| File System | Verify domain directories are removed |
| Issue | Possible Cause | Solution |
|---|---|---|
| Domain still accessible | DNS cache or web server cache | Clear cache; restart services; wait for DNS propagation |
| Error in service restart | Configuration syntax errors | Check config files for syntax; verify all domain references removed |
| Database errors | Orphaned database entries | Recheck MySQL for remaining databases/users |
| Email delivery issues | Remaining email configurations | Verify /etc/virtual files cleaned properly |
| DirectAdmin panel errors | Incomplete user data removal | Check user.conf and domain list files |
If manual removal is too complex, consider these alternative approaches:
Reset: If issues persist, restore from backup and try alternative method.
Support: Consult DirectAdmin documentation or community forums for additional help.