Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Two Home Pages?

         

martinacastro

12:40 pm on Oct 26, 2010 (gmt 0)

10+ Year Member



We know that www.site.com is different of www.site.com/index.php

Why Google index me www.site.com and www.site.com/index.php as different pages if I dont link /index.php page?

Can I block google putting in robots.txt
Disallow: /index.php

or this will cause that Google not index my hole site?

Thanks for the support!

tedster

4:35 pm on Oct 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Odds are that someone, somewhere did use the index.php version in a link and your server resolves it as 200 OK. That creates a canonical URL issue.

Blocking it in robots.txt will not prevent the splitting of link juice into two buckets. For that you need to 301 redirect index.php to the root.

martinacastro

7:07 pm on Oct 26, 2010 (gmt 0)

10+ Year Member



Thanks ted.

Can I use .htaccess like this to do the 301 redirect?

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ MySite.com/$1 [R=301,L]

Or perhaps I must put default.php (as my root file/homepage) and in the index.php delete the actual code and put a redirect code to the root?

Thanks again for your help
Martin

tedster

8:16 pm on Oct 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See this discussion Merging www.example.com/ and www.example.com/index.htm [webmasterworld.com]

Note, that thread is in the Hot Topics area [webmasterworld.com], along with lots of other good reference stuff. That resource is always pinned to the top of this forum's index page.

martinacastro

10:54 pm on Oct 26, 2010 (gmt 0)

10+ Year Member



Thanks tedster, I will follow your links

By the way, do you think that this kind of duplicate homepage (canonical URL issue) can cause the drop of my site?

Regards

tedster

10:56 pm on Oct 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes - I've seen it happen. Whether it is causing trouble now or not, you should get it fixed. You don't want to see backlinks popping up to both versions.

martinacastro

11:24 pm on Oct 26, 2010 (gmt 0)

10+ Year Member



Thanks!

Im also trying with the other issue of massive links for a third sites. One site have the links at the footer and the other one at the sidebar, perhaps I reached some kind of link threshold...

Thanks again for your support