Optimizing Dynamic Pages - Part II
The Widget Queen Revisited You have world's finest collection of widgets. You created world's best widget website. You have no traffic.
You checked in search engines and find that your site does not appear at all, even though all your competitors' sites do. Perhaps search engine robots cannot get to your pages to index them.
Search Engine Robots Search engine robots are simple creatures. They can "read" text to add to their databases, and they can follow "normal" links--those links that are coded to look like
or slight variation
That's it. Search engine robots cannot select items from lists; search engine robots cannot type text into boxes; search engine robots cannot click "submit" buttons. That means that no matter how important our dynamically-generated page of blue widgets is, if only way to access that page is to select it from a list or click on a button, robot will never be able to visit it. That, in turn, means that it will never appear in search engine results.
So how do you get your dynamic information to show up in non-dynamic ways?
The Painful Solution One of reasons that dynamic pages exist is because of difficulty involved in constantly updating -- adding and deleting -- pages from your site, based on which widgets you are offering this season. If you have a separate page for each make and model of widget, each of those pages can be spidered. They can all be reached through links that look like
blue widgets style 1 blue widgets style 2 red widgets style 1 red widgets style 2 new widgets style 1 new widgets style 2
The bad news here, of course, is that you now have to create all of those pages. This loses benefit of drawing widget information from a database.
A Better Solution A better solution is to create only a "shell" of each page, and then to dynamically populate page from our database. By creating a "real" file, you can assign a fixed URL, but still use database to fill-in page, using any of various server-side techniques (HTML server-side includes, Perl, Active Server Pages, Java Server Pages, PHP, etc.). A simple page like this might suffice:
Blue Widgets style 1< itle>
Save this page as "bluewidget-1.html" and you're good to go, assuming that "myscript.pl" will actually return content you want for body of page. True, you will have a discrete page for each item in your inventory, but at least you only need to hard-code bare-bones of that page.
Another Way To Go There is yet another way to go. This method does not require creating dozens of static pages, or of having to include exotic scripts in your web pages. It also may not work for all search engines!