PHP Search Engine Optimization
(Page 1 of 4 )
You want to convince search engine spiders to crawl your pages frequently. You need to put in keyword-rich, dynamic content to help convince the spiders to check your pages regularly. Unfortunately, many spiders trip over dynamic pages. How do you fix this problem? Use PHP to give your dynamic pages static-looking URLs. Roger Stringer explains how to do it.
PHP is a useful language, used by many all over the Web. But it has one failing. By its nature, it is not search engine friendly. In fact, it's the exact opposite. But with some clever tweaking, we can make PHP a powerful tool in the quest for search engine dominance.
Proper search engine optimization can make PHP even look like a different script. You could make it look like an HTML file or several HTML files, one for each article on your site.
Speed
Speed is a major factor for websites. If a search engine spider follows a link on your site and is forced to wait too long for the server to process the PHP code behind that page, it may ignore your page and move on.
The biggest slowdowns in a PHP script are typically the database and loop code. Try to avoid making any SELECT * calls; instead, name all the columns you want to retrieve. Using SELECT * on a table that contains 10 fields when you only want to use one or two fields is a waste of valuable resources.
To optimize loops, try to use duplicated code instead of loops that don't repeat very many times. Additionally, use as many static values, such as count($array) values, inside the loop as you can, generating their values before they loop once.
Next: Session IDs >>
More Search Optimization Articles
More By Roger Stringer
|
| · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | | |
|