Google Search Engine Listing

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
okelly
Forum Commoner
Posts: 29
Joined: Thu Feb 23, 2006 2:18 pm

Google Search Engine Listing

Post by okelly »

Hi.

Typing "site:http://www.okelly.net" into Google indicates Google has only indexed the home page from my site (which contains 300 pages). Google searches for other pages don't return any result. From my web stats I can see Googlebot indexing the site but it doesn't appear to be getting into the Google directory when I search.

I have used META tags on the home page. I haven't used META tags in the 300 pages (which get called from a MySQL database and get served up by php pages.) mypage.php?ArticleID=100 etc...

Any ideas on
1. why Google is only returning the home page in the search, although GoogleBot seems to be indexing the whole site?
2. how to optimise Google ranking (using php pages)
3. how do I incorporate META tags into the <HEAD> of the php pages and call these from the MySQL database containing the website articles?

thanks in advance
Conor
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

Question 1)
How do you know Google is indexing the whole site? I use bbclone http://www.bbclone.de to accurately look at what visitors including googlebot look at!

I just looked at your home page and the menu system is javascript based. My impression is that Google prefers static links, by which I mean links it can see like href and src.

Googlebot is a bit like a text only reader. So check your site with Lynx reader - http://www.delorie.com/web/lynxview.html If links appear on that test, google will index them.

<a href=""> a link to a site map from the home page with <a href> links to every page on the site! That will give Google links it likes while still keeping your javascript menu - and will also keep users who have disabled javascript from not staying!

Submit a sitemap to Google https://www.google.com/webmasters/sitem ... -gdlnsbeta

Question 2)
Only use keywords in the meta tag that are also in the content. Google doesn't like keywords that try to boost searches and aren't in the rest of the document.
Link to good sites and get good sites to link to you - key way to boost your rank.
Running Google ads also seem to help a little!

Question 3)

2 ways
i) if the tags are the same for every page - I would put meta tags etc in a file say top.php and include
("top.php") at the start of pages that want those tags
ii) if teh tags are different for each page - create a blob field for tags with each page row, query the blob field and output it as a part of the header
okelly
Forum Commoner
Posts: 29
Joined: Thu Feb 23, 2006 2:18 pm

Outputting php in <HEAD> field

Post by okelly »

Thanks Andy. This is helpful and gives me something to work off. I'll start with the sitemap & see how it goes. Of the 300 pages about 20-30 of them are key pages so I'll start there!

Can I just output php normally in the <HEAD> field same as normal output into the <BODY> field....no special formatting/code required??

I guess so, just never really thought of doing it (assumed it was more complex)??
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I think I get what you're asking!

PHP only processes stuff between <?php and ?> as php language. So as long as your html comes outside of those tages it will get sent as is. Otherwise it will need echo statements.

So to make pages quicker to write using css for design i would have a page perhaps looking like this

Code: Select all

<?php
include("top.php"); //the headers if there is no processing that requires headers not to be sent
include("left.php"); // the left hand menu coding
include("content.php"); // the content itself
include("footer.php");
?>
left.php would contain html for the menu and any php code to handle that if necessary and so on....

That way you are only coding common bits once for all your pages and if you change stuff, it is only once.

Hope that helps!


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply