Forum Moderators: open

Message Too Old, No Replies

Converting from html to php Without Loosing Google Listings

         

northweb

2:42 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



Hi, any suggestions on the best way to convert pages from html to php without effecting your position in google?

northweb

ciml

3:11 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have five main choices, as I see it.

1. Configure your server to parse .html files for PHP scripting.

2. Configure your server to rewrite /a/b.html to /a/b.php internally (no HTTP redirection)

3. Redirect (HTTP 301) and hope that Google does the right thing (usually it does, but not always)

4. Leave the duplicates and hope that Google will merge the listings with the .php addresses

5. Update the .html pages to be just a link to the .php pages.

Personally, I'd prefer 1 or 2, as the others are messy and may be problematic depending on Google's whim at the time.

Tim B-L famously told us all that "Cool URIs don't change" and of course he was right. killroy wrote a nice description [webmasterworld.com] aftyer he "got it".

synergy

5:41 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



Go with #1. This is the easiest option, plus it hides the fact that you are using php to do what you do.

Nick_W

5:44 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




<Files *.html>
ForceType application/x-httpd-php
</Files>

Put that in a .htaccess and all will be well...

>hide the fact

erm... is that important? ;=

Nick

jatar_k

6:29 pm on Oct 11, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Go with #1
simple, straight forward and keeps all your already indexed pages right where they are.

You could always ask your host for help if you don't know how to set it up.

requiem

6:36 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



Go with #1. If you are changing the site structure at the same time then go with #3. I just used #3 to merge four sites with a total of 4300+ pages (PR 3, 5 , 5, 5), it worked as a charm google updated the backlinks after 23 days, and the new site got PR 6.

coolasafanman

8:06 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



I agree with #1, except that many browsers don't refresh 'html' pages as often as pages with the .php extension etc. On one of my sites, I used a semi work around for this by adding?random after .html for members who surf the site, as metatags don't always seem to help.

World Wide Wibble

8:57 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



I agree that #1 is a good option. I use it with success. But why hide the fact you're using php from Google at all? I have had very good experience with Google indexing explicitly-PHP pages like "filename.php".

Actually Google really seems to like them. However, be warned if you are using lots of variables after a "?". This is what Google does not like so much. You should be fine with just one variable, and at a push two.

filename.php (fine)
filename.php?name=1 (fine)
filename.php?name=1&var=23 (should be ok)
filename.php?name=1&var=23&id=456 (be prepared for bad results with 3+ variables.)

requiem

1:37 am on Oct 12, 2003 (gmt 0)

10+ Year Member




But why hide the fact you're using php from Google at all?

It is the easiest and most straight forward solution to
northweb's problem.


Actually Google really seems to like them. However, be warned if you are using lots of variables after a "?". This is what Google does not like so much. You should be fine with just one variable, and at a push two.

Yeah, but Google and the other engines prefer a static looking uri. With some simple URL rewriting you could make this scary URI:
[gizmos.com...]

look like eg:
[gizmos.com...]

In my experice static looking URIs always get a SERP boost.

jatar_k

2:21 am on Oct 12, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



But why hide the fact you're using php from Google

In this particular case the issue at hand is not having to worry about the bot looking for pages which don't exist anymore and making a seamless change over.

without effecting your position in google

The only option that offers that is 1.

sidyadav

3:44 am on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just use #1 , forget the fact that you're hiding PHP to Google etc.

All you want is to add a PHP code in HTML.

Sid

ciml

10:33 am on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why does no one like option 2? Note that I was writing about internal redirection without redirects.

I'm not saying it's better than 1; just equivalent from Googlebot's point of view.

northweb

3:46 pm on Oct 12, 2003 (gmt 0)

10+ Year Member



Man, thanks for the help.
northweb

jatar_k

5:14 pm on Oct 12, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



2 is a good one too but as soon as you start using rewrite the learning curve indreases. Your host may even just make the parse html as php change for you but i doubt they'll add rewrite rules.

If you know mod rewrite then they are equivalent options, so no worries ciml. ;)