Redirect one domain to another

Discussion in 'Site & Server Administration' started by webseo, May 20, 2007.

  1. #1
    Hi

    I want to be able to close down one site and have any natural search and link traffic to automatically go to the new website. How can I do this without losing page rank or giving the user a 404 error page.

    Any help will be appreciated.
     
    webseo, May 20, 2007 IP
  2. Davidj

    Davidj Peon

    Messages:
    124
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    webseo,

    You'll want to use what's known as a 301 redirect.
    You can do so via an .htaccess file like so:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

    It's as easy as pie. :)
     
    Davidj, May 21, 2007 IP
  3. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It can also be done by cPanel's Redirects feature(Though, it also uses .htaccess)
     
    inworx, May 23, 2007 IP
  4. Spider Man

    Spider Man Guest

    Messages:
    2,109
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sinply create a .htaccess file into your root directory with the below line in bold:
    ErrorDocument 404 http ://websiteurl.com

    Remove Space b/w http and ://websiteurl.com
     
    Spider Man, May 23, 2007 IP