Hi I am currently in the middle of converting my large HTML website www.ukfishersonline.com into PHP. I have decided to do the conversion due to the fact that the website is becoming very large and it’s taking me forever to make changes. My problem is that my website is very well established on many search engines and it also has quite a bit of page rank throughout the website and I do not want to lose my page rank and/or affect my position in any of the search engines. This is the main reason why I have not let the PHP version go live yet. At the moment by looking on Google, I have come across many answers to my problem, Some people say change all filenames from "HTML" to "PHP" and then add the following into an .htaccess file · RedirectMatch permanent ^(.*)\.htm(l?)$ $1.php Or · RedirectMatch permanent ^(.*)\.htm(l?)$ $1.php [r=301,nc] Yet others say leave all filenames as “HTML†and add the following to an .htaccess file · AddType application/x-httpd-php .htm .html I would be grateful if someone could give me a 100% answer on how I can convert my website into PHP yet without losing any page rank and/or affecting my search engine position Thanks
Well, the first method should protect your indexing and page rank but will mean that your pages will remain with the search engines as .html and unless you keep these files on the site, pretty soon Google will find that they've gone and will remove them from the index anyway - I think. I don't think Google will read your .php pages as if they were the old .html ones and keep the index for .html, but to be honest I'm not sure. Even if they do do that, it'll mean your pages will be shown as being .html and won't be a 'real' index. Whether you're bothered by this is up to you but to my mind I'd much prefer not to have to bother about smoke and mirrors. The second method tells the server to execute the .html extension as a PHP file, which would probably be fine but there you're authoring files with a 'wrong' extension and it's another thing that might cause confusion or problems in the future. Not least of which is you'll probably find your preferred editor won't be able to syntax highlight correctly unless you manually change some sort of preference. My personal preference would probably be to do the first option, and do the very best to get Google indexing the new files. I've had a decent index built within a few days and while it'll take longer to regain the page rank, you'd have to ask who this is actually important to. I don't know of any 'normal' web users who worry about page rank, it's only designers At the end of the day, if you're making a major change to a site, I'd always suggest being 'honest' with it and getting the change out of the way. Any kind of kludge or fix is exactly the sort of thing that gets forgotten about and comes back to bite you years later. I've just recently rebuilt a (fairly small) site from .html to .php and used the redirect. Complete reindexing of the new php pages was done within about 10 days. Jon