Home > Fluid Dynamics Search Engine > Help > 1123

Handling search terms that are valid URLs

Many inexperienced Internet users are unable to distinguish between a browser Address/Location bar and a search engine text input. For example, when asked to visit "www.foo.com", such users might go to the Yahoo! home page and enter "www.foo.com" into the Yahoo! search engine. This causes confusion when the given site is not in the search index; the users often report that "the site is not coming up".

Conflicting text input areas

FDSE can handle these special types of queries in three ways:

  1. treat the URL or fragment as a normal search term; return documents which contain the string.

  2. treat the URL as a normal search term, but also at the top of search results list, have a special link that says "Click here to visit {URL}"

  3. redirect the visitor immediately to the URL entered.

By default, FDSE will use option 2. To control FDSE behavior, go to "Admin Page" => "User Interface" => "User Interface-Related Settings" => "Handling URL Search Terms" => "Edit". The setting takes an integer value from 1 to 3, with each number corresponding to one of the approaches listed above.

At the time that this feature was added to FDSE, most major search engines were using approach 2 or 3 - that is, being aware of when the search term looked like a URL. Now at the time of this writing, all search engines except FDSE appear to be treating URL-type search terms as any other search term.

Identification of a search string as a valid URL is done in the AddressAsTerm block at the top of search.pl/search.cgi. To be treated as a URL, the search string must consist of a single word and match either (http|ftp|https|telnet)://(\w+)\.(\w+)(.*) or www\.(\w+)\.(\w+)(.*).


    "Handling search terms that are valid URLs"
    http://www.xav.com/scripts/search/help/1123.html