Forum Moderators: open

Message Too Old, No Replies

Google And Php read me include

Using a php script and keeping google friendly

         

lasko

5:18 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



My boss has a very complicated structure of websites
and came to me to advise him on SEO. Most of the sites rank very poor hence the reason why he called me in.

He wants to have static htm pages but a small area will
need to display upto date info. He wants to do this by
using a Php read me include.

So we have our web page optimised and in it will be a php script that tells the server to grab some content from another server.

My question is does google accept this?

I generally stick to plain html but I am facing an ever increasing demand for more interactive pages that rank well.

Its a big head ache can any one advise?

jeremy goodrich

5:25 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just limit the variables to one, if possible, Google will crawl dynamic pages just fine - as long as they dont' have a session ID, or "require" a cookie to load the page(s) of the site.

We've had lots of discussions about dynamic urls, etc - I highly recommend trying the site search [webmasterworld.com] & some keywords like, "google dynamic url".

Cheers. :)

figment88

5:47 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Jeremy, why the assumption that there are any variables?

I read the initial post as wanting to do something like:

1) have a file with a php extension such as file.php

2) with in this file have something like


<HTML>
<body>
Static HTML Stuff

<? include("someotherfile.inc");?>
</body>

3) file.php would be dynamic because the content of someotherfile.inc would be changed on a regular basis or would have some script that would open and parse some dynamic content

lasko, if this is what you are talking about, Google won't even see the php include - php is all preproceesed by the server. In fact, if you wanted, you could completely hide that you are using php by setting up your server to parse *.html files.

jeremy goodrich

5:50 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, at some point, when doing dynamic stuff, it's pretty common to use variables in urls - though, of course, depends on the site.

It's good to get all the bases covered at once, instead of having to go back to the script later & fix it, ya? :)

Any scripting language will work as figment88 said with Google, perl, Asp, cold fusion, jsp, asp.net, etc.

As long as the output is html, text, pdf, excel, ms word, or any of the other file types that Google indexes, you'll be fine.

lasko

6:37 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



I think thats what he wants the tech guys will be sorting it out my job is marketing in Google so I now have to know
more about php etc.

Is using Asp really bad for Google?

It seems that basic web sites are the best when working for
Google and then link it to dynamic pages.

figment88

6:48 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dynamic sites are good for Google, it attracts the FreshBot.

Parameterized URL strings are bad for Google but it is getting much, much better at them.

There are many ways to have dynamic sites without paramaterized URL strings.

BTW, a parameterized URL string just means that there is a question mark after the file name followed by name-value pairs, such as

[somesite.com...]

chiyo

7:05 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Correct me if im wrong, but i thought that seeing Php is server side, to any spider like Googlebot they will see just what is in the include as part of the page in normal HTML. How the page is built is not of influence. The spider will not even see the URL of the included content. If its an include the URL of the page can be anything you like so im not sure how variables come into it?

If the above is correct I guess the answer to laskos questions are..

1. yes its very easy and no hassle

2. google would not see any difference from if you changed the included content manually on each page.

3. Whether it is seen as duplicate is another question, depending on how large the include is as a proportion of page size, how many pages it is inlcuded on, and whether you robot.txt or htaccess out, or put on a non-public section of the server the original file so its not able to be seen independently.

ircgeeks

7:57 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



From personal experience I have found that on my extremely large php website. A mod_rewrite technique in conjunction with robots.txt and .htaccess virtually solved my spider problems overnight

nell

8:13 pm on Apr 10, 2003 (gmt 0)

10+ Year Member



innerHTML is used to dynamically write to a <div>. Use it in IE4,5,6 and NS6.

here is an example of what to do with the div.

<div id="nell"> </div>

now here's how you use the javascript to dynamically write to it.

var theCode = "<p><font face='Arial' color='#003366' size='2'>write update text and html here to put in your "nell" div</font>"

if (ie4¦¦ie5¦¦ie6)
nell.innerHTML=theCode;
else if (ns6)
document.getElementById('nell').innerHTML=theCode;

jatar_k

8:25 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



lasko, chiyo has it all down there. :)

including inside page is fine, bots won't even know because it is server side as chiyo said.

On the other hand if you start passing vars around and including different content based on passed params then you need to be very careful.

I generally stick to plain html

no prob, mine all look like plain html, my dynamic sites serve nice clean html but are dynamically created. No worries lasko, I know a place you can get some good help
Perl and PHP CGI Scripting [webmasterworld.com] ;)

vincevincevince

8:26 pm on Apr 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php include("foo.bar");?>
Piece of cake :) I use it for everything....
Here's a hint, change mod rewrite so it parses .htm¦¦.html with php, then you get to keep all your old static seeming structures and internal links