Google Webmasters Help FAQ

Weblog for the Google Webmasters Forum

Are you moving to the new domain correctly?

Posted by John Mueller on April 4th, 2007

When moving to a new domain name (with the same site) you will need to use a [301 redirect]. The 301 redirect tells the search engines that the old address is no longer valid and to pass all value to the new address. There are some details that you should look into and correct if they are incorrect.


Be certain that you are using a 301 redirect (and not 302)

Sometimes a small mistake in setting up the redirect can result in the server not using a 301 redirect (and using a 302 instead). This mistake will not be visible in your browser (at least not without additional tools). However, for a search engine, a 302 redirect means something completely different than a 301 redirect (even though many search engines now consider a cross-domain 302 redirect to be the same as a 301 redirect).

You can check the 302 redirect by using a server header viewer like http://oy-oy.eu/page/headers/. Just enter the old domain name and confirm that the redirect is a 301 redirect to the new domain name.

The correct output should look like this:

URL=http://www.olddomain.com/
Result code: 301 (MovedPermanently / Moved Permanently)
New location: http://www.newdomain.com/

URL=http://www.newdomain.com/
Result code: 200 (OK / OK)

Check the canonical versions of both domains

When choosing a domain name, you will also need to choose either the www or non-www version of the name. It is important that the non-preferred one is also 301 redirected to the preferred one. Similarly, both versions of the old domain name need to be 301 redirected to the preferred new one.

Using the same server header tool as above, and assuming that you prefer “www.newdomain.com”, you should confirm that the following redirects are also done with a 301 redirect:

  • olddomain.com -> www.newdomain.com
  • newdomain.com -> www.newdomain.com

Check the detail pages

Most websites are going to be moved completely before being redesigned and restructured (however, the same principles would still apply if the site is moving domains and being restructured at the same time). Since the 301 redirect is transferring the value of the old pages to the new ones, it is important to confirm that everything is being redirected on a page-by-page level. All old URLs need to be 301 redirected to the appropriate new URLs. If the site is being restructured at the same time, the old URLs need to be 301 redirected to the matching new URLs.

If you know your old pages, you can test a few of those URLs. If you do not know the old URLs, you can use a search engine “site:-query” to check for previously indexed URLs on the old domain. For example, [site:olddomain.com] will show the URLs indexed for that domain. This works on Google, Yahoo and MSN/Live.

Confirm that several of the old detail URLs are being properly 301 redirected to the appropriate new URLs. For example:

  • www.olddomain.com/something/page.htm -> www.newdomain.com/something/page.htm

Got it! What now?

A move to a new domain name will generally come with a temporary dip in search engine rankings. It will take some time for the search engines to recognize the new domain name with the same value as the old domain name. A move like this should not be taken lightly - it needs to be done as rarely as possible.

If you take your time to set it up correctly and to confirm that it is working correctly, this move will however not impact your site’s crawling, indexing and ranking in the long run.

References:

10 Responses to “Are you moving to the new domain correctly?”

  1. Paul Mycroft Says:

    This is great.

    Question: exactly where do you put the 301 redirect if you have canceled the web hosting for the old domain?

    Thanks!

  2. John Honeck Says:

    Paul,

    Did you cancel the web hosting, but still own the registration for the old domain?

  3. Paul Mycroft Says:

    Hi John,

    Thanks for the response.

    This is just hypothetical; I just want to understand this technique fully.

    If you own the old domain, let’s say it’s hosted in GoDaddy, how do you apply a 301 redirect on that domain name?

    I know that to redirect old pages to new ones on the same domain requires an .htaccess file (on Apache anyway, not sure on IIS) but I have yet to locate the answer to the above question.

    Thanks again,
    Paul

  4. John Mueller Says:

    As far as I know you have to set up hosting to do a site-wide 301 redirect with GoDaddy. You can do a 301 redirect in the “Forwarding” section, but you can only specify a single URL - it will not redirect the files and folders to the appropriate locations. A “full-site-to-single-URL” 301 redirect is a possibility, but it is not the optimal solution. If you have “value” in the old domain and in the old pages (if old pages are still indexed), then I would suggest to set up hosting for the domain just to be able to set up the optimal redirect.

    If the domain name is older and has transfered most of the value to the new domain name, and you just need to make sure that the type-in traffic (people entering the old domain name in their browser) is redirected, then a redirect like GoDaddy offers would by fine.

  5. Paul Mycroft Says:

    Hi John M,

    Thanks for your response.

    QUOTE: “If you have ‘value’ in the old domain and in the old pages (if old pages are still indexed), then I would suggest to set up hosting for the domain just to be able to set up the optimal redirect.”

    Does this optimal redirect involve placing an .htaccess file on the root level of the hosting (Apache) server, which would then 301-redirect all attempts to access the old domain to redirect to the new one? In effect, this hosting could be empty except for the .htaccess file.

    Then when all new pages have been indexed by the engines, the hosting can be canceled.

    Am I on the right track here?

    Thanks again,
    Paul

  6. John Mueller Says:

    Yes, that’s correct Paul - the hosting would only be for the .htaccess file to redirect all accesses to the new pages. However, I would wait a while (perhaps a year?) before you remove the hosting and the redirect. If at all possible, afterwards I would continue to redirect using one form or the other (it’s not that important - it’s mainly for the visitors) and certainly make sure that you keep the old domain name. There’s nothing worse than having an old name (that you think you don’t need) expire and having someone set up a copy of your last site with lots of ads :-(. Keep the old name, it doesn’t cost that much.

  7. Paul Mycroft Says:

    Thanks so much, John(s), for taking time out of your day to assist me.

    Much appreciated.

    Paul

  8. Ramjet Says:

    John,

    I’m considering moving my site to a new domain since a new domain name may be better suited for the content but I’d also like to use (or sell) the old domain since it would still be useful, just with more specialized content. Is there a way to let the search engines know that the new site is the old site and the old domain is going to be something new? The old site has 2000+ pages and 1500+ backlinks. Since the new site won’t have any backlinks, will the Google Page Rank and traffic be dramatically reduced? What if the old site links to the new site? Is there any way to set up links to help with all that.

    Thanks!

    -Ramjet

  9. Talina Says:

    Can a 301 redirect be used for only part of a site? Say you want to move yoursite.com/blog to blog.com but that you want to keep yoursite.com intact. Would a 301 do this correctly?

  10. Tom - Graphic Design Says:

    A 301 redirect is the best (and only I think) way of letting Google that your site has permantley moved thus retaining pagerank and the effectiveness of your inbound links to your old site. Not too sure how Yahoo and other search engines handle your PR in terms of 301’s though.

    For single page redirects, a 301 can be used for single pages. A good explanation is at the link below:
    http://www.dailyblogtips.com/how-to-setup-a-301-redirect/

    We recently changed our domain and used a 301 redirect from our old domain. I haven’t as yet noticed any drop in rankings… the only downside being that to get the 301 to work (with 123-reg anyway) we had to have some web hosting rather than domain name hosting alone.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>