Ph. P.roblems

Pike's SEO Tactics - PHP

XMLRSS feed

PHP Session IDs

PHP Session IDs will kill search engine's spiders. If you configure PHP incorrectly to rewrite every link to add the session ID then each time if will find what looks like a brand new page. Except, its not a brand new page. It's the same page from before with a new session ID.

Ensure that the "session.use_cookies" configuration is set to "1" so that the session id is not appended to each and every url on your site. Upload a php file containing just the following line to check if your server is configured correctly.

<?php php_info(); php?>

Rewriting URLs

Search engines have a hard time with pages with arguments like the following:

http://www.domain.com/index.php?page=foo&dothis=bar

This could be real content or it could just be "http://www.domain.com/index.php?page=foo" with no changes to the page or it could be accessing a database and there are an infinite supply of foos and bars the spider will try to download. Since no search engine wants to be accused of stealing all of somebody's bandwidth, spiders are reluctant to follow any links like the above. If the URL of a page has more than two arguments most search engines never index it.

The solution is to change the url so the search engine's spider thinks it is accessing a real file when really they're just following the old link. This is easily accomplished on a Apache web server by rewriting the urls dynamically.

Examples...

For more information see the Apache page about mod_rewrite.

Last Updated: Wed, 20 Apr 2005 05:30:48 GMT
All rights reserved © 1999-2007 Matthew Bystedt