Look into using your web server's mod_rewrite functionality to alter the 
URL that the search engines see.  For an example, look at Wordpress' 
permalinks or Joomla's SEF (search engine friendly) URLs.

What this will do is make all your dynamic pages look more like static 
ones.  If all your PHP pages had unique names like "about.php" and 
"ourmission.php", then the file name sort of lends itself to SEO already, 
but that would be a pretty boring website, and probably one that doesn't 
need PHP, if that was the case.

The big issue are pages that take parameters:


You could turn this into:


But that's still not very semantic and doesn't give search engines much to 
work with.  So you can massage it even further with something like:


Kind of ugly, but you can use mod_rewrite to turn that into:    
 then use PHP to extract the 23 and 55 to display the proper data.

Depending on the variables you're passing, you could exclude the numbers 
(which do nothing for SEO) and use PHP to figure out what to display.

domain.com/Footware/Happy_Bunny_Slippers  (shorter URLs are favored by SEO 
as not having "too much information" and some search engines only looking 
at the first XX characters of the URL means that the shorter the URL, the 
more info you can pack into it).

With mod_rewrite, you can tell it to check to see if a file exists, and if 
it doesn't, process a more complicated rewrite.

So if the catalog is your main source of dynamic data, then you could leave 
the "catalog" part out and use the 
domain.com/Footware/Happy_Bunny_Slippers format.    If you had other 
dynamic data, you could leave the catalog in as a clue for the 
mod_rewrite as to what PHP script to use to process the rest of the 

Another thing you can do is use the canonical tag to indicate which pages 
are duplicates.   You may not think you have duplicates, but a common 
example would be if you have a page, then you have the same page that's 
just sorted differently.  Or if you had a "print friendly" version of a 
page without menus and such.  The content is essentially the same (which 
search engines will see and think you're trying to stuff the ballot box 
and make your site look more relevant to that subject when really you're 
not).   So if you have:


Then you'd want to set a canonical tag at the top of each of these listings 
that says:

(meaning that all these pages are the same as 

You may be saying that pages sorted differently are different output.  
True.. but it's all the same data in the end.  Even with pagination.

And the biggest thing you can do for SEO isn't really even PHP related.    
Have good semantic markup.  Make sure it all validates and has a proper 
doctype assigned.  And make your content as organic and human as 
possible.  Don't write content for machines and search engines... don't 
try to "write to keywords" by making your content all awkward by stuffing 
as many keywords in as possible.   The search engines are pretty smart.  
Write good content and write it for humans... make it relevant to the 
topic and your audience and the search engines will see that and deliver 
it to your audience higher in search rankings.

There are other things, but these are some of the big ones.


----- Original Message -----
From: Gautam Bhatia <mail2gautambha...@gmail.com>
To: php-general@lists.php.net
Date: Sun, 20 Dec 2009 12:15:45 -0500
Subject: [PHP] PHP and SEO Workarounds

> hey folks,
>                 This is in regards to SEO and PHP, From what i have
> read , most (Not all) the PHP Contents is dynamic , which makes it so
> powerfull , but it also means that chances of it being indexed in search
> engines are less , am i right in saying this ? . If so how do i optimize
> my site  for search engines which is being powered by PHP and content is
> Dynamic. Please guide in this regard. Thank you.
> Regards,
> Gautam Bhatia
> mail2gautambha...@gmail.com

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to