Forum Moderators: phranque
Will the file extension change affect our ranking/indexing/SEO?
Yes. If all of those .htm file extensions are indexed, then you've got some work cut out for you if you plan on changing them to .php.
There are different ways to approach this issue. I think the best alternative would be to do Content Negotiation at the server level and eliminate all file extensions.
The second option would be to place a 301 Moved Permanently redirect from the old-page.htm to the new-page.php.
The third option would be to leave the .htm pages as they are. You state that Google represents a big chunk of your referrals. Those will surely die for a bit while Google figures out what is going on with your site.
You've also got inbound links to consider. Unless you plan on personally contacting all of your link partners and instructing them on the change, you will be creating a mess for yourself.
But, it is not only Google you need to worry about. There are other spidering entities that are just as important. They may not be as smart as Googlebot or as quick.
I've found that the change of file extensions may take anywhere from 60-120 days before seeing final results. Even then, there will be ghosts still floating out there.
P.S. Depending on how many pages are indexed, you might want to start with just changing a few of the pages. Do it in groups over time.
The bigger problem comes if you are changing the site's structure as well as the file extension. In that case, you must use a 301 redirect for every old page and redirect them to the equivalent new page.
I did also think of using META refresh and a redirect to new URL. With a 3 second delay I can urge users to update their links/bookmarks.
What do you think?
for instance, say you have a file which contains html structures, included in some php script, and it has a .blog extension. normally, if some one accessed this file directly, Apache would output the source markup as raw plain text. however, piping it through the php machine..
AddType application/x-httpd-php .blog
magically transforms the output to readable html. neat.
but for what you're trying to do, I would simply add the following..
RewriteEngine on
RewriteRule ^(.*)\.html $1\.php
to my .htaccess file. from now on, all requests to whatever.html will load whatever.php in its place, you can write nice php pages, perhaps including the old html content, and the url remains html. you and your inwards linkers can upgrade at their leisure, meanwhile, the search engines get double-helpings of your content.
as an added bonus, this allows you to easily split php code and included html structures into two separate files, always a nice idea. folks can link to whatever.html or whatever.php, but they'll always they get whatever.php in their browser, and this will still work even if whatever.html no longer exists!
;o)
(or