Using php include() with google
Moderator: General Moderators
-
reverend_ink
- Forum Contributor
- Posts: 151
- Joined: Sun Apr 20, 2003 1:18 am
- Location: Las Vegas | London
Using php include() with google
I would post this in code area but it really isnt a code question, its a usability question.
Has anyone figure dout how to use include(file.php) with google and get that file to be spidered properly?
I have a few sites I am working on that all use header files and none of that information is being listed by google....
Thanks all!
Has anyone figure dout how to use include(file.php) with google and get that file to be spidered properly?
I have a few sites I am working on that all use header files and none of that information is being listed by google....
Thanks all!
-
reverend_ink
- Forum Contributor
- Posts: 151
- Joined: Sun Apr 20, 2003 1:18 am
- Location: Las Vegas | London
-
cravikiran
- Forum Newbie
- Posts: 7
- Joined: Sat Sep 18, 2004 4:55 pm
reverend_ink, I am not sure if you understood the include commnet. Like Bech100 said, Google will see whatever you see in your browser, that is, it sees what's outputted by your PHP script. Therefore, the internals (including include()) of your script will not matter. Google will simply follow the link structure that exists in the HTML outputted by your script.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
reverend_ink
- Forum Contributor
- Posts: 151
- Joined: Sun Apr 20, 2003 1:18 am
- Location: Las Vegas | London
If you go here http://www.google.com/webmasters/guidelines.html you will see that google does not parse includes. It doesnt ignore your code but does not prse the include, much like Lynx. If you download and use Lynx you will see that that information is not viewed in the browser, and googlebot uses a similar system to read your pages.
It isnt that google doesnt see the php output, it just cant read the includes.
It isnt that google doesnt see the php output, it just cant read the includes.
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Google sees the HTML.reverend_ink wrote:If you go here http://www.google.com/webmasters/guidelines.html you will see that google does not parse includes. It doesnt ignore your code but does not prse the include, much like Lynx. If you download and use Lynx you will see that that information is not viewed in the browser, and googlebot uses a similar system to read your pages.
It isnt that google doesnt see the php output, it just cant read the includes.
By includes I believe they were talking about iframes or javascript/css links?
But could you show where it says they dont do include pages?
rev is talking about this i think
Goooooooooogle wrote:If you decide to use dynamic pages (i.e., the URL contains a '?' character), be aware that not every search engine spider crawls dynamic pages as well as static pages. It helps to keep the parameters short and the number of them small.
Keep the links on a given page to a reasonable number (fewer than 100).
Thats Right !!
Most pages with a ? will not get spidered - You can get around this by by using Mod_Rewrite so instead of having a page like:
http://www.mydomain.com/index.php?lanuage=english
you Mod_Rewrite it to beocome
http://www.mydomain.com/english.html
This will then get spidered - But by no means will Google not index a page if it has a include(""); file in !
I have got most of my pages indexed in google and I use lots of includes
Hope this helped a little
Most pages with a ? will not get spidered - You can get around this by by using Mod_Rewrite so instead of having a page like:
http://www.mydomain.com/index.php?lanuage=english
you Mod_Rewrite it to beocome
http://www.mydomain.com/english.html
This will then get spidered - But by no means will Google not index a page if it has a include(""); file in !
I have got most of my pages indexed in google and I use lots of includes
Hope this helped a little