extra www subdomain - and cannot remove!

nsdesign2

Registered
Jan 27, 2012
2
0
51
cPanel Access Level
Root Administrator
cPanel won't allow users to create a "www" subdomain - and rightly so, because ww is handled in the main DNS as a CNAME...

However - some of our users have managed this (probably many years ago before the limitation was put in place).

This cause massive problems every apache recompile - because the system thinks the domain's document root is public_html/www

Anyway.. I need to delete these extra (false) www subdomains.. but clicking on delete in the users cPanel gives:

==========
There was a problem removing the subdomain www.usersdomain.com
Show Details : Error from domain wrapper: Can't Change the master entry (www).
==========

ANy ideas? Obviously don't want to break the "correct" use of the www, but need to get it rid from cPanel as a seperate subdomain, as it's causing problems!

Thanks in advance!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

You should check for "www" subdomain entries at the following locations:

Code:
/var/cpanel/userdata/username/main
/var/cpanel/userdata/username/sub.maindomain.com
/var/cpanel/users/username
Remove entries within the files, and any individual files used purely for the "www" subdomain. Ensure you do not remove the "ServerAlias" itself, as you will still want the "www" alias for the domain name in the Apache configuration.

When you have finished, run the following commands:

Code:
/scripts/rebuildhttpdconf
/scripts/updateuserdomains
Thank you.