Deleting Subdomain does not actually delete it

May 29, 2008
7
0
51
So here is the deal, within CPanel users are able to add their own Subdomains.
The form to create a subdomain with CPanel looks something like this:

Subdomain:
Enter SubDomain Text Field
. example.com

So CPanel automatically takes whatever is in the text field and appends ".example.com" to the end of it.

The problem is the user entered this:

Subdomain:
exchange.example.com
. example.com

The user ended up with a subdomain named: "exchange.example.com.example.com". This happens because of CPanels Automatic appending of the ".example.com" to the end of whatever is the text field.

Now - when trying to delete this improperly named subdomain with both the root account and user account - CPanel will show that the subdomain has been successfully removed but nothing will change, the improper name still appears in the list.

How can I remove this subdomain?

I appreciate any help.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I'm sure there are more elegant solutions, but one solution I am aware of to delete the subdomain exchange.example.com.example.com is to create com.example.com and example.com.example.com then delete exchange.example.com then example.com.example.com then com.example.com.

Are the user using the x3 theme? If not, I recommend using it as its interface for creating subdomains is a bit more intuitive to curb issues such as this.
 
May 29, 2008
7
0
51
Thank you for your prompt responses.

The process mentioned worked great to delete the "exchange.example.com.example.com" subdomain. However, now the "example.com.example.com" subdomain will not delete.
I believe this is because the original domain "example.com" is setup as an addon-domain.

This is what CPanel tells me:
There was a problem removing the example.com.example.com
Show Details
Sorry, the subdomain example cannot be removed because it is linked to the addon domain example.com. You must first remove the addon domain.
I noticed that the document root for both domains is the same. If I could change the document root than I would be able to delete the subdomain.

Is there any easy way to change the document root for a subdomain and delete it without messing with any addon domains?

Thank you for your help.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Thank you for your prompt responses.

The process mentioned worked great to delete the "exchange.example.com.example.com" subdomain. However, now the "example.com.example.com" subdomain will not delete.
I believe this is because the original domain "example.com" is setup as an addon-domain.

This is what CPanel tells me:


I noticed that the document root for both domains is the same. If I could change the document root than I would be able to delete the subdomain.

Is there any easy way to change the document root for a subdomain and delete it without messing with any addon domains?

Thank you for your help.
Each element of "example.com.example.com" is treated as a separate part of the entire domain name. To delete one part, the other parts must exist.

Thus, com.example.com must exist in order to delete example.com.example.com. Just as example.com.example.com had to exist to delete exchange.example.com.example.com