Multiple Versions of same page being indexed

Discussion in 'Search Engine Optimization' started by bloard, Dec 31, 2006.

  1. #1
    I know this has been answered 100 times here, but I don't know what to search for to find it...

    I have a top level domain for my hosting account that I don't use. My main domain is an "add on" and is a subfolder of the top level domain. I am now noticing that google is listing some of my pages with the url of the toplevel domain and I don't want those indexed.

    example....
    Page I want indexed: www.domain2.com/mypage.php

    Page showing in serps: www.domain1.com/domain2/mypage.php

    What's the fix for this?

    Thanks... and thanks for answering for the 101st time.
     
    bloard, Dec 31, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need a "301 Permanent Redirect" from 'domain2/' to '/'. You can do this by adding the following to your .htaccess file (if it is supported):
    RewriteEngine on
    RewriteRule domain2/(.*)$ http://www.domain.com/$1 [R=301,L]
    
    Code (markup):
    Guys in the DP Apache forum can help you out further...

    Cryo.
     
    Cryogenius, Jan 2, 2007 IP