1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

It is good SEO practice redirect index(.htm,.php) to root?

Discussion in 'Search Engine Optimization' started by PictureMeRollin, Feb 7, 2007.

  1. #1
    I've been reading on here and other sources that people will redirect thier index.php to the root.

    I have about 3 directories that have index.php in them, for example...."www.example.com/about" or "www.example.com/contact"

    Should i be 301 redirecting these index.php files to thier respected "/"? Are there advantages or downfalls to this?

    example (htaccess):
    redirect 301 /contact/index.php http://www.example.com/contact

    Any advice would be much appreciated!

    -B
     
    PictureMeRollin, Feb 7, 2007 IP
  2. ablaye

    ablaye Well-Known Member

    Messages:
    4,024
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    150
    #2
    SEO wise, it does not matter. At least I think.
     
    ablaye, Feb 7, 2007 IP
  3. tfbpa

    tfbpa The....Alive

    Messages:
    896
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #3
    It used to be thought of as a problem because of duplicate content if multiple urls with the same content were indexed, but that rumour has been put aside. At least 2 people from Google told it wasnt a problem.

    But, even though PR doesnt count for much these days, it IS good practise to avoid having multiple urls indexed.

    IMO you shouldn't redirect pages as you stated, but simple only link to the directory and NEVER to the page itself.

    I.e. link to www.example.com/about/ and DON't link to www.example.com/about or www.example.com/about/index.php

    There are multiple advantages of always linking like that and if you do so there will never be multiple urls indexed with the same content and if you decide to update your site from .html to .php or whatever extension, there will be no problems in the future.
     
    tfbpa, Feb 7, 2007 IP
  4. cormac

    cormac Peon

    Messages:
    3,662
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes I would advise to have the redirect. The best of times Google has trouble with multiple url versions and can slap it as duplicate content. The below are different but yet the same.

    /directory/index.html
    /directory
    /directory/

    So really you should select one and stick with it, redirect all the others. My personal preference is /directory/
     
    cormac, Feb 7, 2007 IP
  5. e96

    e96 Active Member

    Messages:
    299
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #5
    i'd go with mod rewrite to just rewite all index.html urls to directory urls. if you put the code below in your .htaccess file then all index.html pages in all directories including root will be rrewritten to just : /directory/
    
    RewriteEngine On
    RewriteCond %{THE_REQUEST} /index\.html [NC]
    RewriteRule ^(.*/)?index\.html$ /$1 [R=301,L]
    
    Code (markup):
    by the way,i was using the code up above for quite some time, then (it's a long story) but i couldn't use this rewrite rule. three months later my PR fell from 5 to 4 because google was indexing multiple urls for my home page.
     
    e96, Nov 4, 2007 IP