removing /index.php from google index

Discussion in 'Search Engine Optimization' started by mroversized, Feb 25, 2008.

  1. #1
    I have a site that is indexed in google, but there are two urls with the exact same description when I search up my site:

    www. example.com
    &
    www. example.com/index.php

    Is this considered duplicate content? How do I remove www. example.com/index.php when I search up my website on google, so all I see is www. example.com?
     
    mroversized, Feb 25, 2008 IP
  2. mike34271

    mike34271 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ive used robots.txt before to remove it along with the removal tool in google webmasters, or you can make sure none of your site links are to /index.php and let everything take its time naturally
     
    mike34271, Feb 25, 2008 IP
  3. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Insert the below into your .htaccess file (replace yourdomain.com if your domain name.)

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
    RewriteRule ^index\.php$ http://www.yourdomain.com/ [R=301,L]

    This will 301 redirect your index.php file to your www.domain.com address.
     
    astup1didiot, Feb 26, 2008 IP