tanger has asked for the wisdom of the Perl Monks concerning the following question:

Hello: I recently made a site for my cousin, its a online buisness store and the shopping cart we use is commerce.cgi, which is in PERL. The whole storefront , products, etc would be all .cgi. Now Is there anyway for search engines like Yahoo, Altavista, Google etc., could add .cgi files into their directory or list. I see .asp, .php files listed in Yahoo and other search engines, but never .cgi pages. Thank you, Anthony

Replies are listed 'Best First'.
Re: Perl Scripts in search engines?
by Trimbach (Curate) on Aug 24, 2001 at 05:20 UTC
    The reason why you see asp and php files listed at Yahoo et al is because, at their core, asp and php files are just plain 'ol HTML documents. Granted, they're special HTML files where the server does all kinds of mumbo jumbo before they go out to the browser, but they're still just HTML, and if they're called without any arguments they (generally) will give something back that's meaningful and, for the purpose of archiving, this default data is archivable and sortable by search engines.

    Non-preprocessor CGI's (like those written in C, Perl, server-side Java, etc. etc.) aren't HTML files at all, they're executables that (generally) require some sort of specific input from the user to present something meaningful. That is, a Perl CGI often finds out what the user wants (and then displays something interesting) only after the user clicks/selects/types something interesting into a static HTML form. Now, spiders only follow links that are pre-set on webpages, and they aren't smart enough to fill out a form, so the plain old HTML form gets 'botted (a .html file) but the CGI behind it that's called when Submit is pressed is ignored.

    Of course all this is overgeneralized. You can certainly write asp and php that require user input, and you can write a "static" site using .cgi Perl, but you get the idea.

    If you're concerned that your new site gets properly 'botted just make sure there are nice fat hard-linked .html/.asp/.php files tying your site together. You probably do NOT want your dynamic content 'botted (the CGI stuff) because things like Google only archive sites once a month, and you probably don't want someone searching old inventory.

    Hope this helps.

    Gary Blackburn
    Trained Killer