are php includes indexed by search engines?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dru_nasty
Forum Commoner
Posts: 81
Joined: Sat Sep 10, 2005 10:26 am

are php includes indexed by search engines?

Post by dru_nasty »

Say I've got a template page (with my meta keywords) and I use the switch function to include different pages to load within the template like so:

Code: Select all

<?php
switch($_GET['page']){
 
case "about":
include ("about.php");
break;
......etc.
 
And I even include my navigation:

Code: Select all

<?php
    include ("includes/navigation.php");
    ?>
Are the includes searched as it were one page, or is this bad practice when it comes to being indexed by a search engine?
bertfour
Forum Commoner
Posts: 45
Joined: Fri Mar 07, 2008 7:33 am

Re: are php includes indexed by search engines?

Post by bertfour »

Thank God se's can't look in your source code :)

A se spider just sees the html output, no worries
dru_nasty
Forum Commoner
Posts: 81
Joined: Sat Sep 10, 2005 10:26 am

Re: are php includes indexed by search engines?

Post by dru_nasty »

Right, but it's not html output until a browser hits the page.
So does a search engine read the include as html?
anto91
Forum Commoner
Posts: 58
Joined: Mon Mar 10, 2008 10:59 am
Location: Sweden

Re: are php includes indexed by search engines?

Post by anto91 »

Of course it does.
bertfour
Forum Commoner
Posts: 45
Joined: Fri Mar 07, 2008 7:33 am

Re: are php includes indexed by search engines?

Post by bertfour »

dru_nasty wrote:Right, but it's not html output until a browser hits the page.
So does a search engine read the include as html?
Ehhh, the html generated for "anything" that hits your php page is the same... (normally)

A bot is also a browser :lol:
dru_nasty
Forum Commoner
Posts: 81
Joined: Sat Sep 10, 2005 10:26 am

Re: are php includes indexed by search engines?

Post by dru_nasty »

Great, thanks for the replies ;)
Post Reply