I have 2 domains that are registered at GoDaddy :

domaina.com (not hosted, only domain name is registered to GD)
domainb.com (hosted at a different webhost, domain name registered to GD)

domainb.com is an already working site, with a different webhost, but the domain name is registered to GoDaddy (and I assume the nameservers are changed to redirect to the webhost).

Now, I don't understand why this was done, but domainb.com is considered a subdomain on the host... meaning the files are in a seperate folder on the server.
Ex : public-html/domainb.com/public-html/FILES

The structure is similar to this on the webhost:

HostNAME (main root folder)
    domainb.com (subdomain of hostname)
    domainc.com (etc...)
    domaind.com (etc...)

I want to transfer the site domainb.com to domaina.com, meaning domaina.com will become the new website, without having to re-upload all the content and CMS. The old one will redirect to domaina.com once the transfer is done (using 301 redirects).

Can anyone tell me how I can do this?

2 Answers 2


If you are using Cpanel, just use the option Modify and Account and your old domain will be changed into the new one.Thus, the old domain will be deleted from the server and the file will remain.

You will only have to check the db connection after this and check the paths for your scripts ( as they may change as a result of the domain changing).


Assuming you have access to the web server configuration, e.g. httpd.conf, you can just edit the existing domaina.com VirtualHost or create a new one using the domainb.com directory as its root. So if the absolute path to the files for domainb.com is /var/www/public-html/domainb.com/public-html, and you want to host it as domaina.com:

ServerAdmin [email protected]
DocumentRoot /var/www/public-html/domainb.com/public-html
ServerName www.domaina.com
ErrorLog logs/domaina.com-error_log
TransferLog logs/domaina.com-access_log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.