Removing a subdomain in DirectAdmin while controlling file deletion

Removing a subdomain disables its hosting entry. DirectAdmin can also offer to remove its directory contents, so distinguish retiring the hostname from permanently deleting the files used by its application.

Prepare for the change

Back up the subdomain files and any associated database. Record the document root and confirm whether another site or process uses it. Decide what should happen to the DNS name and whether an intentional redirect is required.

01 Remove a subdomain in DirectAdmin while controlling file deletion

  1. Select the correct parent domain and open Account Manager > Subdomain Management.
  2. Select the exact subdomain being retired and choose Delete.
  3. Review Remove Directory Content carefully. Leave it cleared when you need to preserve the files; select it only after confirming the directory and verified backup.
  4. Complete the deletion and review external DNS separately. Remove or change records at the actual authoritative DNS provider according to the retirement plan.
  5. Review databases, scheduled jobs, mail references and certificates linked to the application. Delete those separately only when you have confirmed they are unused by other services.

How do I verify which subdomain files remain?

Confirm the hosting entry is gone and that retained files remain when requested. Test the parent site and any other site sharing storage. Verify the retired hostname no longer exposes the old application unexpectedly.

If the change does not work

If the wrong subdomain was removed, recreate its configuration from the recorded document root and restore files only if they were actually deleted. If DNS still points to the server, a default page can be expected until routing is changed. Do not delete a shared database or directory merely because its name resembles the subdomain.

Sources and further reading

  • 0 Users Found This Useful
  • control-panels, domains-dns
Was this answer helpful?

Related Articles

Removing a redirecting domain pointer in DirectAdmin

Remove a domain pointer when an additional domain should no longer redirect through the current...

Creating a website or path redirect in DirectAdmin

A redirect sends a browser from one URL to another. Use a path redirect for a moved page or a...

Removing a website redirect in DirectAdmin

Remove a redirect when its source URL should serve content again or when the previous...

Adding a domain alias in DirectAdmin

A domain alias makes an additional domain serve the selected website while allowing that...

Creating a redirecting domain pointer in DirectAdmin

A redirecting domain pointer sends visitors from another domain to the selected main domain....