Welcome to WebmasterWorld Guest from

Message Too Old, No Replies

Will changing index.html to index.php affect rankings?



12:26 am on Apr 19, 2009 (gmt 0)

5+ Year Member

I want to change the root index.html to index.php so I can use includes on the page.

I am already using the following in htaccess to rewrite index.html and index.php to /

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default¦index)\.(php(4¦5)?¦html?¦cfm¦aspx?)\ HTTP/
RewriteRule ^(([^/]+/)*)(default¦index)\.(php(4¦5)?¦html?¦cfm¦aspx?)$ http://www.example.com/$1 [R=301,L]

I want to do this to my biggest money site which has great rankings, therefore I am very cautious about any changes.

Is the googlebot going to be able to detect the change?

[edited by: tedster at 2:09 am (utc) on April 19, 2009]
[edit reason] switch to example.com - it cannot be owned [/edit]


2:33 am on Apr 19, 2009 (gmt 0)

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

In the case of the domain root itself - Google should have it indexed as just the domain root, and not index.html. If that is the case, then changing just that one page to php should not cause you any trouble. However, if Google has your page indexed with both urls, your rankings may already be tangled up just a bit.

However, you can set a server to parse php script within the page's source code - even though the extension remains .html. That's an issue that has come up a couple thousand times in our PHP forum [google.com], and taking that approach would make your whole concern evaporate.

Meenakshi Mosaic

5:51 am on Apr 20, 2009 (gmt 0)

5+ Year Member

In case, google has indexed two URLS (html and php) then you can use 301 redirect from html to php.

The rankings may affect if we change the extension of the page without redirect.


Featured Threads

Hot Threads This Week

Hot Threads This Month