Which Redirect should i use ?

Discussion in 'Search Engine Optimization' started by WorldImpulse, Oct 31, 2005.

Thread Status:
Not open for further replies.
  1. #1
    I have a site which has good backlinks and also some traffic. I am planning to start a new site with a better domain and leave the current one (there are also some other reasons for leaving the current domain).

    Which will be the best way to redirect the current domain to the new domain so as to get the maximum benefits from the links of the current site and also so that the traffic comes to my new site?
     
    WorldImpulse, Oct 31, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    301 (Permanent)
     
    digitalpoint, Oct 31, 2005 IP
    WorldImpulse likes this.
  3. WorldImpulse

    WorldImpulse Well-Known Member

    Messages:
    2,084
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Thanks Shawn.. you are quick ;)
     
    WorldImpulse, Oct 31, 2005 IP
  4. WhatiFind

    WhatiFind offline

    Messages:
    1,789
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    180
    #4
    In php you could a 301 like this
    <?php
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: http://www.newdomain.com/');
    header('Connection: close');
    exit;
    ?>
    PHP:
    And with apache mod_rewrite rule you could do it like this
    RewriteEngine on
    RewriteRule ^index\.html$ http://www.newdomain.com/index.html [R=301,L]
    Code (apache):
     
    WhatiFind, Oct 31, 2005 IP
  5. WorldImpulse

    WorldImpulse Well-Known Member

    Messages:
    2,084
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    185
    #5
    Thanks whatfind... i was searching on google for the same :)...

    What do you say about this one ..
    In the .htaccess add this code :
    redirect 301 /directory/file.html http://www.domainame.com/directory/file.html

    *Note: The first part "/directory/file.html" is the location of the file being moved and the second part "http://www.domainame.com/directory/file.html" is where the file is being moved.

    Which one will be better out of the three (the two you mentioned or this one)?
     
    WorldImpulse, Oct 31, 2005 IP
  6. WhatiFind

    WhatiFind offline

    Messages:
    1,789
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    180
    #6
    I don't believe there's much of a difference between those codes. Some servers do not accept mod_rewrite, you have to check your isp for that. Both easy to set up.
     
    WhatiFind, Oct 31, 2005 IP
    WorldImpulse likes this.
  7. WorldImpulse

    WorldImpulse Well-Known Member

    Messages:
    2,084
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    185
    #7
    Thanks for the help Whatifond :).... i will just set it up in some time.
     
    WorldImpulse, Oct 31, 2005 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    Also, if you want to globally redirect all pages within a domain (without having to specifically define a redirect rule for each page), you might find this useful.
     
    digitalpoint, Oct 31, 2005 IP
  9. WorldImpulse

    WorldImpulse Well-Known Member

    Messages:
    2,084
    Likes Received:
    303
    Best Answers:
    0
    Trophy Points:
    185
    #9
    Hey thats what i was exactly looking for ...
    Thanks a Ton:)
     
    WorldImpulse, Oct 31, 2005 IP
Thread Status:
Not open for further replies.