Msg#: 4443926 posted 10:35 am on Apr 22, 2012 (gmt 0)
My client has had a site on a domain for the last year and now because of a copyright issue they have to change the domain and I am unsure of the best way to handle this.
The have bought the new domain and the nameservers are pointing to the hosting space and obviously the hosting company can now change it so the website comes up for the new domain.
BUT how do we notify Google, etc that it is the same site but just a new domain? I think we need a 301 redirect somewhere (assume htaccess) but if the old domain no longer has its own space how does this work?
Easiest solution first: Check with the previous host. They may be able to redirect-- although maybe only to your new index page. You don't want that if the overall site is the same.
Do you have to give up the previous site's physical space? Take a quick look through the Apache forum and you will see that redirecting page-for-page from an old domain to a new one involves a single line in htaccess. You don't need to keep any files in the old place, just the htaccess.
There is a category in GWT under Site Configuration called "change of address". That's what you want.
Msg#: 4443926 posted 8:10 am on Apr 23, 2012 (gmt 0)
Do the change of address at gwt.
And ask the host if they do page-for-page redirects (as opposed to just dumping everyone on the new domain's index page). No point in doing the work yourself if they have a few lines of code that can be activated with a single button click. Especially if the new domain is occupying the same physical directory space as the old one.
You can only redirect if the old place exists in some way-- that is, the DNS has to point somewhere. If you've had to pull the plug entirely-- telling the DNS that this domain name no longer exists anywhere-- then you're out of luck. Otherwise, it's a single line in htaccess.
Come to think of it, you don't even need to add anything. You've probably already got the code you need. If you've got a name-canonicalizing routine like
just change it from the old name to the new name, and put it where requests for the old name will see it. (Check with the host. Some things can go in shared htaccess for a userspace leading to more than one domain, but some things have to go one level lower, in the domain's individual directory.)