1

I have a lot of SHTML pages.
If I change these to PHP to add some more functionality (obviously changing stuff like includes to PHP where necessary) will this effect how search engines index my site? (most importantly Google)

Will they still index the PHP files the same as the old SHTML and just as often, etc.?
Will there be any difference?

Background Info:
Server=IIS

This is my thinking/reasoning behind this question. We have a lot of shtml pages.
I think it's because Google will index them all.
E.g.: If you have a file individual_page.php and essentialy this page is many pages; individual_page.php?id=39430403 then Google won't index each one right? But if I have static files, they'll index them all, right?

2 Answers 2

1

Will they still index the PHP files the same as the old SHTML and just as often, etc.?

Providing that the resulting content is served up as HTML with the correct content-type, yes.

Will there be any difference?

If all of the URI's indexed by the search engines are presently in the form of http://domain.com/file.shtml this will be a major change (your content will effectively disappear until search engines pick up on the new URI's).

You should implement 301 - Permanent redirects from the old URI's to the new URI's for your content (ex. http://domain.com/file.php) if you want your site's content to maintain its present rankings with major search engines.

1
  • The major change you speak of (my content will effectively disappear until search engines pick up on the new URI's), will this happen even if I do implement the 301?
    – Adam Lynch
    May 13, 2011 at 12:02
0

It's also possible for you to run .shtml pages as PHP pages without having to change your file extension. All you need to do is tell Apache to handle .shtml pages as PHP. The following snippet will do that for you:

<FilesMatch "\.shtml$">
  ForceType application/x-httpd-php
</FilesMatch>

That way you don't have to worry about redirects or pages being reindexed because to users and search engines the URLs will be the same.

Update

1) Google does index pages with query strings just fine. Having them is not a bad thing at all is very common and normal.

2) How ever you are using SSI you can do it the same way in PHP so if you don't have query strings in your .shtml pages then you won't need them in your .php either.

4
  • But will the existing SSI commands (e.g. SHTML variables) still work? If so, then say in a year's time, upon changing the content that PHP file outputs, will Google be able to index it just as well and as quick, etc.?
    – Adam Lynch
    May 13, 2011 at 13:22
  • @Adam The SSI commands will not work as they are not PHP commands. So if you are rewriting your site with PHP, which is what I inferred from your question, then you will want to do this. If you are not going to rewrite your site with PHP then you shouldn't be doing anything to change your URLs. Google indexes all kinds of pages equally whether it is .php, .shtml, .asp, etc. No one is better then another as far as search engines are concerned.
    – John Conde
    May 13, 2011 at 13:27
  • Will this work with IIS?
    – Adam Lynch
    May 13, 2011 at 15:09
  • @Adam Not the way I wrote it. That is Apache specific. But this should explain how to it with IIS. This one, too.
    – John Conde
    May 13, 2011 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.