Domain modification question


#1

I am interested in modifying the name of an existing subdomain. I have several applications installed in sub-directories and understand that I would need to alter the configuration files for those applications once the name change was complete. I do not host my primary domain with Dreamhost–only subdomains, so I always have to create the subdomain in Dreamhost and send the DNS info to my systems administrator to add a local DNS entry for the new subdomain.

What do I need to do to change name1.mydomain.org to name2.mydomain.org while keeping the contents intact? I know this is probably simple, but I’ve looked through the wiki and forums and can’t seem to find anything specific to this topic. Thanks in advance for any help you can give.


#2

I done something like this before and it’s not a perfect method, but it does the job.

  1. Go to your DH domain panel and add the new name2.mydomain.com, making sure it’s under the same user as the name1 subdomain.

  2. Log in as that user via SSH [FTP should work too]

  3. Depending on how exactly you want this move/change to take place you can vary the method using 301 redirects, filesystem links, or what have you. What I would suggest is the following:
    i) rename the new, empty ‘name2.mydomain.com’ folder to something else temporarily. ie. 'tempname2.mydomain.com
    ii) rename the existing ‘name1.mydomain.com’ to ‘name2.mydomain.com’ [this will effectively move everything to the new subdomain]
    iii) rename the tempname directory to ‘name1.mydomain.com’ which will give you a place to drop any redirection scripts or notice pages to direct your users to the new address

You’ll probably have to modify/test some of your config to make it work on the new name, but the bulk of the move should be taken care of.


#3

The above method is the right way to do it. A quick and dirty way is to Mirror name1 as name2:
http://wiki.dreamhost.com/Mirror_Domain

-Scott