How do I make my PHP website search engine friendly?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
icarpenter
Forum Commoner
Posts: 84
Joined: Mon Mar 07, 2005 8:12 am
Location: Kent, England

How do I make my PHP website search engine friendly?

Post 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...
Hardcore4Life
Forum Newbie
Posts: 14
Joined: Mon Oct 10, 2005 7:58 am
Location: Hannover / Germany
Contact:

Post 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 ;)
User avatar
icarpenter
Forum Commoner
Posts: 84
Joined: Mon Mar 07, 2005 8:12 am
Location: Kent, England

Post 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?
deltawing
Forum Commoner
Posts: 46
Joined: Tue Jun 14, 2005 2:55 pm

Post 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.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

User avatar
icarpenter
Forum Commoner
Posts: 84
Joined: Mon Mar 07, 2005 8:12 am
Location: Kent, England

Post 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
User avatar
Nathaniel
Forum Contributor
Posts: 396
Joined: Wed Aug 31, 2005 5:58 pm
Location: Arkansas, USA

Post 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)...
User avatar
dbevfat
Forum Contributor
Posts: 126
Joined: Tue Jun 28, 2005 2:47 pm
Location: Ljubljana, Slovenia

Post by dbevfat »

Also, javascript redirects or popups are dead ends for a bot.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

wow some nice stuff here, ill take a look at some of it
User avatar
icarpenter
Forum Commoner
Posts: 84
Joined: Mon Mar 07, 2005 8:12 am
Location: Kent, England

Post by icarpenter »

Thanks Guy's

This a great help!!!

Google no 1 Here I come!
Post Reply