Forum Moderators: open

Message Too Old, No Replies

PHP includes and google bot

PHP includes and google bot

         

freemink

11:37 am on Oct 17, 2002 (gmt 0)

10+ Year Member


Hi. I'm srtuggling to understand this. Hope someone can help.

My website is now written in PHP. Initially it was HTML, then SHTML with server side includes.

Each page consists of a number of php includes:
(rough idea)
Page1.php =
<html>...
<table>...
<?php include 'sidenavigation.php'?>...
<?php include 'title.php'?>...
(MAIN CONTENT HERE)
</table></html>

What I am not sure about is how a search engine (google in particular) handles this. I'm sure that the google-bot will index the content on the main page okay.
But what about the included files?
Does the main page get indexed after the includes are included (i'm guessing so)?
Does the bot index the include files separately? This would mean links could appear in the search engine's results page that go directly to 'sidenavigation.php' (for example). I don't want this to happen of course.
If so, how do I avoid this happening?

So, main question is: how do i avoid component pages (like title.php) being indexed individually by a search engine resulting in links directly to the component page?

I'd like to understand this more, and would appreciate any advice, or just point me to a decent explanation somewhere.

Thanks in advance,
freemink.

brotherhood of LAN

11:41 am on Oct 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello freemink, welcome to Webmasterworld [webmasterworld.com].

The good news is you have nothing to worry about ;)

PHP is parsed on the server side.....basically the bottom line is...if you load up your page, as you do with your browser, this is exactly what the googlebot will see. PHP, ASP or any other scripting language, it will not matter, as the source code that PHP outputs is already done before the page is requested by bot or browser.

[edited by: brotherhood_of_LAN at 11:42 am (utc) on Oct. 17, 2002]

Nick_W

11:42 am on Oct 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dont worry about it ;)

PHP is server-side which means that the end user never gets to see your php. Including bots.

All they see is the resultant html.

Nick

freemink

11:51 am on Oct 17, 2002 (gmt 0)

10+ Year Member



Thanks for the speedy response. Yes, I think I wasn't thinking clearly. I was worried that the google-bot would 'follow links' to the componet pages (like title.php), but of course there are *no* links to these pages - just php include statements! Silly me.

dhdweb

5:57 pm on Oct 17, 2002 (gmt 0)

10+ Year Member



It never hurts to ask!

There are no stupid questions here! :)