Problem with parked domain, can't remove :(

zodiac9797

Active Member
Apr 17, 2011
43
5
58
I have accidentally parked domain with "www" (www.xydomain.com) thru WHM & now I can't remove parked domain. In WHM I can remove it from DNS zone, but when I login to cpanel account domain is still there under parked domains. When I click REMOVE parked domain I receive error message:
"Error from park wrapper: Unable to find out which user owns the parked domain www.xydomain.com".

How can I remove this domain? :confused:
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Manual modifications to /usr/local/apache/conf/httpd.conf (which is symlinked to /etc/httpd/conf/httpd.conf file) will be reverted on the next Apache recompile via EasyApache or whenever you rebuild Apache using /scripts/rebuildhttpdconf script.

As such, you would instead need to edit the file at /var/cpanel/userdata/username/main location (please note that username is the cPanel username for the account) after backing it up, then remove the www.xydomain.com as a parked domain in that file:

Code:
cd /var/cpanel/userdata/username/
cp main main.bak
vi main
The file will look like the following for the contents:

Code:
--- 
addon_domains: {}

main_domain: cptestj2.com
parked_domains: []

sub_domains: []
You'd simply return the file to looking like it should for the parked domain entry when it has no parked domain listed. If you have another parked domain, it would look like this with multiple parked domains:

Code:
--- 
addon_domains: {}

main_domain: cptestj2.com
parked_domains:
  - parkeddomain1.com
  - parkeddomain2.com
sub_domains: []
In that instance, remove the one showing the www.xydomain.com part, but do not remove the other parked domain(s) you have.

You would then copy the Apache configuration, rebuild it and restart it:

Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110419
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
You should also remove any DNS#=www.xydomain.com entry in /var/cpanel/users/username location, which builds the entries for /etc/userdomains, /etc/trueuserdomains and /etc/domainusers files. Please note that DNS# would be a DNS line with some number like DNS5= for the parked domain entry and again username is the cPanel username for the account. Before editing the file, please ensure to copy a backup of it:

Code:
cd /var/cpanel/users
cp username username.bak
vi username
Upon editing that file, you'd want to push the changes you'd made using the following script:

Code:
/scripts/updateuserdomains