1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

301 / Canonical Problem - Quick Help

Discussion in 'Black Hat SEO' started by Laubster, Oct 30, 2014.

  1. Laubster

    Laubster Senior Member Premium Member

    Joined:
    May 21, 2013
    Messages:
    1,008
    Likes Received:
    377
    Occupation:
    Self employed
    Location:
    I Travel A Lot
    Home Page:
    Hey everyone. My GF wants to transfer her WP site from www.domains.com (plural) to another domain she owns: www.domain.com (singular). I know how to clone sites, but don't quite understand how to do this so that all the old URL's points to the new URL's. Can I edit the htaccess file on the old site so that all URL's are 301'd to the new site properly? And if so, can you copy/paste the code here or point me in the right direction please?
     
  2. -0o0-

    -0o0- Junior Member

    Joined:
    Jun 30, 2011
    Messages:
    153
    Likes Received:
    111
    Try this in your htaccess file. Should redirect all old pages to new pages:

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