As far as SEO goes is http://yoursite.com/index.php the same as http://yoursite.com/?

Discussion in 'Search Engine Optimization' started by Attilitus, Aug 10, 2006.

  1. #1
    I was just wondering if as far as SEO is concerned if there is a difference in whether or not there is a backslash or index.php on some pages.

    Additionally, I am curious as to whether or not the file extensions .html, .htm, and .php are considered to be different.

    This would be primarily in terms of PR.

    SO for my final question are all these pages considered the same for google pagerank and SEO? :

    • http://yoursite.com/
      http://yoursite.com
      http://yoursite.com/index.php
      http://yoursite.com/index.html

    Thanks!
     
    Attilitus, Aug 10, 2006 IP
  2. nicknick

    nicknick Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    As far as I've seen. They are all the same. The only problems happen when you go from .html to .php or whatever. Takes google a bit of time to catch up and pass pagerank to the new index page. But you can take care of it with 301 redirects.
     
    nicknick, Aug 10, 2006 IP
  3. BlogtoProfit

    BlogtoProfit Peon

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Best thing to do is 301 redirect everything to "www.yoursite.com/" - also make sure your internal links (as well external links) reflect this. this way you consolidate all the linking power into one rather than dilute that power. Most search engines dont have this canonical issue, but to be sure, the best method is to place this code in your .htaccess (if using Apache):

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^DOMAIN.com [NC]
    RewriteRule ^(.*)$ http://www.DOMAIN.com/$1 [L,R=301]
     
    BlogtoProfit, Aug 10, 2006 IP
  4. sji2671

    sji2671 Self Made Mind

    Messages:
    1,991
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    170
    #4
    Never link to yourdomain.com/index.whatever
    You may wish to change from html to php or asp or....

    Your homepage is your domain www.yourdomain.com for ranking purposes there is no difference but you don't want people linking to a page that may not be there in the future.
     
    sji2671, Aug 10, 2006 IP
  5. nicknick

    nicknick Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Google webmaster tools will also let you specify www or non www versions of your URL if you want that.
     
    nicknick, Aug 10, 2006 IP
  6. A.N.Onym

    A.N.Onym Peon

    Messages:
    75
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The thing is that those four above are all different pages from the SEs point of view. So pick one variant, preferrably http://www.domain.com/, and stick to it.

    Yes, setting up a .htaccess file to redirect to the www version will help, too.
     
    A.N.Onym, Aug 10, 2006 IP
  7. Attilitus

    Attilitus Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Seriously?

    There is a difference between:

    http://www.gamefurther.com
    and
    http://www.gamefurther.com/


    as well as a difference between:

    http://www.gamefurther.com/
    and
    http://www.gamefurther.com/index.php

    ???

    Thanks.
     
    Attilitus, Aug 10, 2006 IP
  8. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yes, the search engines see these as seperate pages, especially the second example you gave (the first example should be okay). Make sure that you keep all your internal links to your homepage consistent; i.e. always use HREF="/" never HREF="/index.php". You should never reference index.php anywhere in your links (internal or incoming).

    You can improve matters with Redirects, for example:

    # Warning - untested code
    if (strpos($_SERVER['REQUEST_URI'], 'index.php')) {
        $filename = str_replace('index.php', '', $_SERVER['REQUEST_URI']);
        header('HTTP/1.1 301 Moved Permanently');
        header("Location: http://" . $_SERVER['SERVER_NAME'] . $filename);
    }
    PHP:
    This will redirect anyone (or any bot) coming in via "/index.php" to "/" using a 301 redirect (never use 302 redirect for this). Alternatively, you can do this using mod_rewrite.

    Cryo.
     
    Cryogenius, Aug 11, 2006 IP