How to Google 301 redirect - Change of domain?

Discussion in 'Shopping' started by Kayz, Jun 19, 2012.

  1. #1
    Hi guys I am hosting with my same web provider and just want to change the domain address without losing rank on google.

    Now i am already signed up with google webmaster tools and have verified my old and new domains, i have also setup 'change of address' via google webmaster tools.

    Now i have applied the new domain to the site by getting my host to replace the old url to the new url and have configured dns correctly to take effect. I have parked my old domain so that the trailing pages and directories work correctly such as /aboutus and news articles like /news/custom-news-title etc Now of course we don't want duplicate content via newdomain.com and olddomain.com so what i did was setup a 301 redirect via htaccess so if people visit the old domain the land on the new domain with the correct page.

    I just need to know which one of the following is the best and correct way for google to work with and understand that articles are now on newdomain.com? I have the following two redirect options, both work but which one shall i use?


    RewriteCond %{HTTP_HOST} !^www\.olddomain\.com
    RewriteRule (.*) http://www.olddomain.com/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^olddomain.com [OR]
    RewriteCond %{HTTP_HOST} ^www.olddomain.com$
    RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
     
    Kayz, Jun 19, 2012 IP
  2. lonking

    lonking Peon

    Messages:
    263
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It seems that Google hates redirecting a lot, but in your situation, it is a good way not to lose the original ranks.
     
    lonking, Jun 19, 2012 IP
  3. Scofz

    Scofz Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've done a fair bit of redirection and have not suffered in the rankings
     
    Scofz, Jun 20, 2012 IP