Redirect 301 in htacces Only for Home Page

Discussion in 'Programming' started by emilix123, Feb 14, 2012.

  1. #1
    Hi guys i have a site with around 1000 pages if I do a 301 redirect only for home page (site[dot].com) by leaving unchanged all other sub-pages google don't deindex site right?

    which code should I use to do the 301 redirect only homepage?

    Thanks
     
    emilix123, Feb 14, 2012 IP
  2. Ultrabooked

    Ultrabooked Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Of course Google won't deindex it.
    Use something like:
    RewriteRule ^/$ http://www.newdomain.com/ [R=301,L]
    Code (markup):
    or
    RewriteRule ^/$ http://www.newdomain.com/newpage.html [R=301,L]
    Code (markup):
     
    Ultrabooked, Feb 14, 2012 IP
  3. emilix123

    emilix123 Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    ok thanks and then google doesn't de-index Homepage even if there is the redirect 301, because that other internal pages don't have redirect....right?
    one last thing ... If I use this code in htacess file:

    
    RewriteRule ^/$ http://www.newdomain.com/ [R=301,L]
    Code (markup):
    redirects me only the home page or the entire site?
    I want to redirect only the home page.

    Thanks for reply
     
    emilix123, Feb 14, 2012 IP
  4. Ultrabooked

    Ultrabooked Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You are welcome. Google will index only the new homepage, because it will be 301-redirected, which means that the old homepage is permanently moved to the new one's address. The other already indexed pages will remain indexed.

    And yes, this code redirects only the home page.
     
    Ultrabooked, Feb 14, 2012 IP
  5. emilix123

    emilix123 Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    There is a way to make 301 redirects without being the old home page is de-index? :confused:
     
    emilix123, Feb 14, 2012 IP
  6. Ultrabooked

    Ultrabooked Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, there isn't a way to make it. 301 redirect means "permanently moved" page.
     
    Ultrabooked, Feb 14, 2012 IP
  7. Estevan

    Estevan Peon

    Messages:
    120
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Estevan, Feb 14, 2012 IP
  8. Ultrabooked

    Ultrabooked Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Good offer but it won't help either in what he is trying to accomplish.
    The 302 redirect, as you said, is a "temporarily moved", so it is designed not to be indexed if the crawler sees it. It interprets it as that the page is under some sort of maintenance "temporarily" and that the page will be back to normal state later, so it won't be changed in the index.
     
    Ultrabooked, Feb 14, 2012 IP
  9. emilix123

    emilix123 Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #9
    My problem that the 302 redirect does not pass Page Rank. I want to capture the Page Rank of the site which I make a redirect...
     
    emilix123, Feb 14, 2012 IP
  10. Ultrabooked

    Ultrabooked Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You can't do that without getting the old page deindexed. That's the whole point of the 301 redirect - to transfer the PR to the new site when you change the domain.
    If you want you can add a few links from the old homepage so this way they will give some PR to the new domain.
     
    Ultrabooked, Feb 14, 2012 IP