homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

index.php and home.php... both indexed and receiving traffic

10+ Year Member

Msg#: 3935941 posted 2:01 pm on Jun 18, 2009 (gmt 0)

I've just begun to work on a site that has the index.php and home.php both indexed and both receiving traffic.

- There is no default page set in Google Analytics
- Home.php receives 15.36% of the traffic
- / receives 13.76% of the traffice
- Index.php receives a small amount of traffic

I could presume / is home.php, but I'm not 100% sure. If I decide to set the default page as home.php is a 301 redirect from index.php to home.php the way to go?

Thanks in advance.



WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3935941 posted 7:07 pm on Jun 18, 2009 (gmt 0)

Yes, a 301 is the best. However, the fullest best practice is to use either www.example.com or just example.com as the canonical url - without any page name at all. I appreciate that with some servers this isn't practical without a lot of reconfiguration, but if you can take this approach, I'd say do it.

Also, I assumed that you were talking about Google traffic with those percentages - am I correct?

Receptional Andy

Msg#: 3935941 posted 7:09 pm on Jun 18, 2009 (gmt 0)

The best solution is in two steps:

- Make it a policy never to link to an directory index document (e.g. index.htm, default.asp and so on). Always link to the full host name (http://www.example.com/) or the root of the directory (http://www.example.com/directory/)

- Permanently redirect (i.e. with an HTTP 301 status code) any requests for duplicate URLs to a single destination - in this case redirect /home.php and/or /index.php to /

The second is slightly more difficult to achieve technically, but if you're on Apache, you'll find a number of references to htaccess-based fixes courtesy of the apache forum [webmasterworld.com], e.g. removing index.php from 301 redirect [webmasterworld.com].

The easy way to check is to visit all of the URLs directly, and compare the content. Otherwise, you most likely have a list of default directory indexes specified in an htaccess file or set by your web hosting company.

Robert Charlton

WebmasterWorld Administrator robert_charlton us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 3935941 posted 8:09 pm on Jun 18, 2009 (gmt 0)

I would recommend doing the redirects on the server as suggested, and not setting a preference in Google Webmaster Tools at all, as that may only mask your problems.

The site could well have external inbounds to a large combination of urls... to "/", to "/home.php" and to "/index.php"... with or without the www. It's best to use proper redirects to get the links redirected and the urls all canonicalized.

I don't know that we're sure that Webmaster Tools is going to assign proper linking credit to all the variants. A proper redirect will.

There's further discussion of canonical issues in this thread, which you can find in the Duplicate Content section of Hot Topics, always pinned to the top of this forum's home page....

Canonical URL Issues [webmasterworld.com] - many ways to introduce duplicates


10+ Year Member

Msg#: 3935941 posted 8:36 am on Jun 20, 2009 (gmt 0)

There are no cononical url issues as http://example.com is redirect to http://www.example.com. The issue is with:

- www.example.com/index.php
- www.example.com/home.php

Thanks for the suggestions and help everybody.

[edited by: Robert_Charlton at 9:42 pm (utc) on June 20, 2009]
[edit reason] changed to example.com - it can never be owned [/edit]


WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3935941 posted 8:18 pm on Jun 20, 2009 (gmt 0)

Find out which *file* is being served when you request the URL "/".

Change all links that currently point to that filename to instead point to "/".

Redirect requests for that filename in the URL to instead request "/".


Is the "other" filename serving the same content as the above?

If so, then redirect requests for that filename to "/" too.

If it serves different content, then leave that one alone.


WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3935941 posted 1:04 pm on Jun 21, 2009 (gmt 0)

Just to be clear, this *is* a URL canonicalization issue. The domain canonicalization has evidently been taken care of, but you've apparently got three URLs for the same page, and therefore, at least two of those URLs are non-canonical.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved