This article describes how to change domain names, when you have an “addon” domain, and wish to change to a new one, but keep the old redirecting with a 301.
Recently I had to wake up to the fact that the domain name I had for one of my sites was awful and spammy sounding, so I decided it was time to change the domain name.
I had spent 6 months building up traffic on it though and did not want to lose the Google organic traffic that the old name attracted, and of course the links that the site had naturally accumulated.
My hosting is with Bluehost, my domains are with GoDaddy. This article however also applies in principle for other hosting providers that use CPanel, e.g Hostgator.
Below are the steps I took to change the domain name and 301 redirect the old name to the new.
1./ Unassign the old name
Note: Before you do this, take note of any email addresses or forwardings that you have set up for the domain.
Go into CPanel, then Domain Manager and select Unassign on the old domain name.
2./ Assign the new name to the same folder the old name was assigned to
This is pretty straight forward, when you are setting up the addon domain just select the folder from the old domain name.
3./ Set up 301 redirect in GoDaddy on the old name, to point to the new
To accomplish this go into the settings of your domain name, click on forwarding | manage and setup the new domain name as below
4./ Change the url for wordpress via the database (via phpmyadmin)
Edit the siteurl name in the wp_options table
5./ Change domain name in webmaster tools
In Webmaster tools it actually does a few handy checks for your when you are updating the address, it will help you ensure you have the 301 working properly.
Make sure you deal with any email addresses you may have had set up with the old domain name, once you unassign it from CPanel they are gone.
I hope your site move goes well!