Page 1 of 1

How do I make my PHP website search engine friendly?

Posted: Wed Oct 12, 2005 3:15 am
by icarpenter
Hi

I am trying to make me website search engine freindly and I am trying to get a handle on the technology?

Currently I have a home page which has search engine (using post method) which retrieves a number of values from a MySQL database and displays these values on a page.

If I create a select statment to extract random information from the database each time the index page loads to populate the meta discription tag would this increase the search criteria of the site. how frequently do robots vist a site and if the description changes every time the page loads would the search engine cache the changes or just update its existing records per domain name?

Because my site is more of a web application as apposed to lots of pages hyperlinked together when I run the site through a meta tag anylsier ie:-

http://www.widexl.com/remote/search-eng ... lyzer.html

the result is OK but it doesn't truly reflect the amount of information that is available from the site as much of this information is generated on a per request basis...

A tipical URL would look like this but there is only a about 8 of these on my index.php

http://www.myiste.com/index.php?option= ... 4e6b28fb84

But the ammount of data that could be retrieved is is massive but this will never show in the anyliser because it cannot select and post the criteria required...


For example each URL or POST always post's to the same file index.php which then creates a new page class, depending on the information carried by the URL or the post determines which objects to call. This then outputs the relevant HTML to the browser...

Any thoughts on how to optimise this procedure to turn my site a search engine beasty would be greatly appreciated...

Ideally I would like to be able take values from the database and have these visible to search engines...

Do I need to create a site map?

Rgds Ian...

Posted: Wed Oct 12, 2005 5:43 am
by Hardcore4Life
Cheers!

for SEO take a look at modrewrite - i thank that helps you a lot!
combine this with your additional site map and the search engines love that ;)

Posted: Wed Oct 12, 2005 11:02 am
by icarpenter
Thanks for that harcore4life.

When a robot visits my site does this parse the PHP like a normal web client? for example will it run mysql querys when it visits...

So when I loop data out of a table into an <a></a> tag to create multiple url's will the robot see these as normal?

Posted: Wed Oct 12, 2005 11:53 am
by deltawing
Yeah, the robots just do ordinary HTTP requests like any browser. If you look through log files of HTTP requests, I'm sure you'll be able to find one or two from the user agent, although many make it look like they're ordinary users on purpose, so you can't customise your site to show them something different to everyone else. I'm pretty sure Google does that, don't know about the others.

Posted: Wed Oct 12, 2005 1:15 pm
by McGruff
I've heard that google doesn't like too many vars in the query string so it would be worth looking at mod-rewrite/force-type tricks.

Posted: Wed Oct 12, 2005 1:41 pm
by Chris Corbyn

Posted: Thu Oct 13, 2005 11:47 am
by icarpenter
Thanks d11wtq that has helped a lot...

One thing that I am still un sure of is...

Can a robot follow a url that has been generated via PHP where information has been extracted from a database to creat the url?

assuming there are no ?'s an &'s ???

Rgds Ian

Posted: Thu Oct 13, 2005 12:01 pm
by Nathaniel
Spiders see your website the exact same way anybody else does... minus styling and any text which is in an image (that is, spiders won't see the "Welcome" text in an image logo, unless it's in the alt attribute of the image)...

Posted: Thu Oct 13, 2005 3:12 pm
by dbevfat
Also, javascript redirects or popups are dead ends for a bot.

Posted: Thu Oct 13, 2005 3:55 pm
by onion2k
dbevfat wrote:Also, javascript redirects or popups are dead ends for a bot.
Also..

Code: Select all

header("Location: page.php");
exit;
.. is a dead end for Google*. Works ok for Yahoo, MSN etc though.

* It's a "301 Permanently Moved" message. There's a trick that using such messages to push a site's pagerank up, so Google is now ignoring 301 messages it seems.

Posted: Thu Oct 13, 2005 11:46 pm
by elecktricity
wow some nice stuff here, ill take a look at some of it

Posted: Fri Oct 14, 2005 2:53 am
by icarpenter
Thanks Guy's

This a great help!!!

Google no 1 Here I come!