Information Technology Services

Custom Search Engines

Making a custom search engine for your site is easy. Just make a form calling our search engine and "restrict" the search to URLs containing a path to your site.

For example, the following HTML code makes a form for searching only within the library's website:

<form method="post" action="http://www.law.harvard.edu/cgi-bin/search">
<input type="hidden" name="restrict" value="/library/">
Search the Library: <input type="text" name="words" value="" maxlength="200">
<input type="submit" value="Go" />
</form>

You can cut-and-paste the above code into a page to use it. Just switch the restrict value of "/library/" to the path to your site (e.g., "/programs/itp/"). If your site is on a different server (such as "internal.law.harvard.edu"), switch the hostname of the "action" value.

Here's a working example of the above code sample -- try it:

Search the Library:

For a complete technical documentation of our search engine, see the Ht://Dig Home Page.