I am changing a web site from HTML & CSS to dynamic pages using PHP, MySQL & CSS.

So the URL’s will change from


I will achieve this URL with a Mod ReWrite using the .htaccess file.

I think Search Engines will rank these pages as New Pages. So I intend to keep the well ranked HTML files loaded to the server for perhaps a year.

Does anyone have experience with altering the coding of a web site. What are the advantages and disadvantages?


If you use a 301 permanent redirect, then search engines should transfer the ranking across to the new format.

You could use a 301 redirect in the .htaccess you are using for mod_rewrite.

Could I host both .htm and .php pages for, say, 6 months…

…then after 6 months use the 301 redirect?

What would happen in Search Engines for the first 6 months? Could the php site be listed in 6th position in a search engine and the html site be listed at 8th position?

I do not want to lose search engine rankings, so an immediate 301 redirect could be a gamble?


If a search engine indexes both types of files without redirection, then it may find content duplication and that would penalise you, probably stronger than any loss in ranking from a 301 redirect.

Matt Cutts (of Google) has said there is a small loss in PageRank from 301 redirects, but I’m not sure of the particulars. Seems like you’re moving from multiple static HTML product pages, to a single Products.php serving product information from a database. Assuming each static product page is changed to 1 dynamic address it shouldn’t be harmful to ranking. You should also consider dropping the .php extension (using a rewrite rule) for a cleaner address and more flexibility in the future.

You might want to hold out for further contributions from other members though.

I was not aware of there being a minimal loss. Is there any chance that you could provide the link where Matt Cutts stated this?

EDIT: Nevermind. I found this, which seems to be the original source:

Matt Cutts: Typically, the 301 Redirect would pass PageRank. It can be a very useful tool to migrate between pages on a site, or even migrate between sites. Lots of people use it, and it seems to work relatively well, as its effects go into place pretty quickly. I used it myself when I tried going from to, and that transition went perfectly well. My own testing has shown that it’s been pretty successful. In fact, if you do right now, I don’t get any pages. All the pages have migrated from over to At least for me, the 301 does work the way that I would expect it to. All the pages of interest make it over to the new site if you are doing a page by page migration, so it can be a powerful tool in your arsenal.

Eric Enge: Let’s say you move from one domain to another and you write yourself a nice little statement that basically instructs the search engine and, any user agent on how to remap from one domain to the other. In a scenario like this, is there some loss in PageRank that can take place simply because the user who originally implemented a link to the site didn’t link to it on the new domain?

Matt Cutts: That’s a good question, and I am not 100 percent sure about the answer. I can certainly see how there could be some loss of PageRank. I am not 100 percent sure whether the crawling and indexing team has implemented that sort of natural PageRank decay, so I will have to go and check on that specific case. (Note: in a follow on email, Matt confirmed that this is in fact the case. There is some loss of PR through a 301).

So, it has been stated by the interviewer that Matt Cutts has indeed stated that there is a minimal loss, although through an unsourced private email; whether you believe that is up to you. Personally, I think any drop would be so miniml that it wouldn’t really cause the average site any harm.

I agree it would be negligible, especially over time. I could see how a page on a relevant domain name, redirected to a page on an irrelevant domain name might lose ranking somewhat; maybe that is where the loss would occur?

In cases like these, I usually do the right thing, and assume Google et al. – with their hundreds of people smarter than me – would do the right thing too.

Is the 301 direct basically an automatic redirect…

and will 301 directs appear in search engines. Would the .htm page feature at Google aswell as the new .php page…

and how long should the 301 redirect be used… Forever… 3 months… 1 year…

A 301 is a permanent redirect, when someone types that URL in or clicks on a link to it, instead of giving them the page, the server sends a note back to the browser that says “Actually the page you’re looking for is now here”, and the browser then asks for that page, and all you know is that a page has appeared and if you bother to look at those kind of things, you’ll see that the URL is different to the one that you hit on.

Googlebot will notice that it’s getting switched to a different URL, and if you’re using a 301 redirect it will update its index to use the new URL and get rid of the old one. How long that takes will depend on the crawl rate of your site, sometimes it might take a little while, but as long as you’ve got the redirect there, it doesn’t matter if people are being sent to the old URL for a bit.

Ideally, you should leave the 301 there forever. There may be other sites out there that have links to your old URLs, and unless you can track down each and every one of these and persuade the webmaster to change the link destination, you need the 301s there so that people clicking on those links are taken to the right page and not a 404 error page.