Hawkfield: web development & web design

Your partner in IT - Gent Belgium

Get all your pages indexed by search engines


Search engines, and Google in particular, index alot of pages. Each day their robot goes to look for fresh content and also refreshes old content.
Having more of your sites pages in the search engine results into more traffic.
Some tips to increase that number of pages are below.

The first, and most important, thing to remember is that Google hates session IDs.
Google indexes all pages, including dynamic content. For google, the page index.php?SID=345E3A450B948C is a completely different page than index.php?SID=7E33A4C0B148C1, which in fact is not true. To prevent from indexing the same page over and over, with the only difference being the Session ID, Google ignore all pages with the session ID in there URL.
But how will you do this without loosing functionaliy?
Save your session IDs into a cookie, or even better, if you do not have a use for sessions, turn them off.

For the same reason as the first, Google doesn't like pages with many parameters, like index.php?id=3&category=4, even if all your pages have different content, it might take a long time before Google index them all.
A possible solution exists with the help of Apache and PHP.
You can rewrite all your pages to link to index.php/1/4.
If Apache cannot find the page index.php/1/4 it will look in the directory above. index.php/1 is the result then, but this one also cannot be found, so it goes up 1 more step, to index.php, which is an actual page. If you wish to use the parameters in that page you will have to use $_SERVER['PHP_SELF'], which will contain the entire URL (index.php/1/4).
Use the explode('/', $_SERVER['PHP_SELF']) function if you need the seperate parts.

A third tip, which isn't easy to acchieve unfortunatly, is to have many links to your pages. The more links get to a page, the more and the faster that page will get spidered.