Get exclusive CAP network offers from top brands

View CAP Offers

changing index.html to index.php, influence on ranknings?

harold asked 4 years ago
Hi,

I have some sites which are made in plain html and therefore their index pages have the extension .html

So http://www.mysite.com will point you to my index.html file on that domain. I now want to add dynmamic concent to these sites and therefore I need to change the index file into a php file. This means that index.html now needs to become index.php

My question is how this will affect my rankings. I figured that it might not make a difference because incoming links are pointing to the domain http://www.mysite.com and not to the specifc index.html file. However, I’m not sure about this and I would like to hear the opinion of people who have experience with this before I waste my rankings..

Thanx!

10 Answers
Marcelo answered 4 years ago
If your links go to the “.com”, you won’t have problems with the links. But google probably index the .html of the site, so you could have search engine problems.

Also, if your other pages are html, same problem. You should make some changes on the .htaccess – search the forum for more info.

harold answered 4 years ago
Thanks. The only thing I don’t understand is this remark “google probably index the .html of the site”

It is not that I’m going to leave the index.html online as well, therefore wouldn’t google automatically switch to indexing my index.php file?

Or do you mean that google would not find index.html anymore and then consider index.php as a brand new page and also rank it like a new page?

Marcelo answered 4 years ago
It may happen, but I am not that sure. A simple .htaccess fix would solve this problem.

Ziggy answered 4 years ago
I remember at one time I had a host the required html as the homepage extension. Mine whole site was .htm. I changed the homepage only, and as mentioned, used the .htaccess file to let the search engines know of the change.

I did notice a sudden drop in the SERPS, but it was very brief as I recall.

harold answered 4 years ago
ok thanks again, but how exactly should I let the search engine know of my change using the htaccess file. I’m familiar with htaccess files but not how I can “announce” the file name change in the htaccess file..

Could you give an example maybe??

thx

allfreechips answered 4 years ago
most php servers can parse html as php.. ie you can tell your server to consider .html as php.

harold answered 4 years ago
thanks but the website is on a shared server and I don’t have to rights to change these settings nor does my provider want to change this..

Therefore, I guess telling search engines that the page has changed to .php is the best option but how do I do this?

harold answered 4 years ago
I thought that 301 redirects might be the best option since it does concern permanent changes. However, now I’m not sure how to use the redirect for the main page. I assume that this would be the best way:

redirect 301 /index.htm http://www.mydomain.com/index.php

The only thing I think is strange about this is that normally the site is accessed without /index.php behind the domain. But I assume that this is no problem since there are basically always two ways to access a site:
http://www.mydomain.com
or
http://www.mydomain.com/index.php (or .htm .html .asp or whatever)

is this all correct?

Andy – bet365affiliates answered 4 years ago
@harold 160547 wrote:

I thought that 301 redirects might be the best option since it does concern permanent changes. However, now I’m not sure how to use the redirect for the main page. I assume that this would be the best way:

redirect 301 /index.htm http://www.mydomain.com/index.php

The only thing I think is strange about this is that normally the site is accessed without /index.php behind the domain. But I assume that this is no problem since there are basically always two ways to access a site:
http://www.mydomain.com
or
http://www.mydomain.com/index.php (or .htm .html .asp or whatever)

is this all correct?

Harold has hit the nail on the head. 301 html – php

answered 4 years ago
@harold 158181 wrote:

thanks but the website is on a shared server and I don’t have to rights to change these settings nor does my provider want to change this..

You probably don’t need them to do it…just add this line to your .htaccess file….should do the trick:

[PHP]
AddType application/x-httpd-php .html .htm
[/PHP]

…and if that doesn’t then this might:

[PHP]
AddHandler application/x-httpd-php .php5 .php4 .php3 .php2 .php .phtml .html[/PHP]

Then you can just run PHP code inside the HTML files.