If you no longer need a subdomain, you can remove it via cPanel. This process deletes the subdomain’s configuration and stops it from resolving to your website, but it does not automatically delete the associated files.
Follow these steps to remove a subdomain in cPanel:
Step 1: Log in to cPanel
- Open your browser and navigate to your cPanel login page (e.g.,
https://yourdomain.com:2083
). - Enter your username and password, then click Log in.
Step 2: Access the Subdomains Tool
- Scroll down to the Domains section in the cPanel dashboard.
- Click on Subdomains.
Step 3: Locate the Subdomain
- In the Modify a Subdomain section, you’ll see a list of all existing subdomains associated with your account.
- Locate the subdomain you want to remove.
Step 4: Remove the Subdomain
- Click the Remove button next to the subdomain.
- Confirm the deletion if prompted.
- This action will remove the subdomain’s configuration from your hosting account but will not delete the associated files.
Step 5: Delete Subdomain Files (Optional)
- If you no longer need the files associated with the subdomain:
- Go to the File Manager in cPanel.
- Navigate to the subdomain's document root directory (e.g.,
/public_html/blog
). - Delete the folder and its contents.
- Be careful to only delete files related to the subdomain to avoid impacting other parts of your website.
Step 6: Update DNS Records (If Applicable)
- If your domain’s DNS is managed externally, log in to your domain registrar’s dashboard.
- Remove any A Records or CNAME Records associated with the subdomain.
- Allow 24-48 hours for DNS changes to propagate globally.
Tips for Removing a Subdomain
- Backup Files: If you think you may need the subdomain’s files in the future, create a backup before deletion.
- Check Dependencies: Ensure no active services, links, or applications rely on the subdomain before removing it.
- DNS Cleanup: Remove DNS records for the subdomain to prevent misconfigured or unnecessary DNS entries.
By following these steps, you can safely remove a subdomain in cPanel and clean up your hosting account.