How to Set Up Search on Your Website
Usability studies show that more than half of all website visitors are search-dominant, about a fifth are link-dominant, and the rest exhibit mixed behavior.
Whatever their preference, visitors expect to be able to find a search box on your agency’s website.
Plan: Organize your information
Understand relevant laws and regulations
There are a number of laws and regulations which must be consulted when implementing a government website. One requirement is that every federal agency public website must include a search function.
Other requirements and best practices address related issues such as plain writing, required links, open government initiatives, customer service, disability access, privacy, and more.
The Research-Based Web Design & Usability Guidelines about Search, Chapter 17 (PDF, 437 KB, 61 pages, July 2007) offers nine guidelines that you should follow when designing a search function for your website.
Determine what content you want to include in your site’s search
Content to search most often includes public-facing web content. This includes HTML web pages, PDF files, word processing documents, and spreadsheets. It also includes multimedia files, such as images and videos.
Many sites have public-facing databases included in search results. Some also have password- or access-restricted content, such as intranet content.
Content may be located on your domain only (e.g., State.gov). It may include sub–domains (e.g., blogs.State.gov or travel.State.gov). It may also include selected, related outside domains (e.g., Pepfar.gov or CivilianResponseCorps.gov).
Publish your content so it's findable via search
Search results listings are different than the content pages themselves. They’re also different than the links to the pages, which are often selected and created in context by content managers.
Search results usually include the page title, a short snippet of text (from the meta description tag, the first few lines of the page, or an automatically generated snippet), and a URL. Focus on these elements to ensure the page is found and that users can understand why a result is relevant to their query. Focus on the pages’ content and structure to ensure it is ranked appropriately by the relevance algorithm.
Follow search engine optimization (SEO) best practices.
- Register with Bing and Google webmaster tools
- Consult Google's Search Engine Optimization Starter Guide (PDF, 4.12 MB, 32 pages, September 2010)
- Tackle the SEO Checklist, Part I and Part II (Search Engine Land)
Following SEO best practices not only is a good way to ensure your content is found by searchers on commercial sites, such as Google and Bing, but also helps make it more findable by searchers on your agency’s website.
Implement: Select a site search tool*
If you follow SEO best practices, commercial search engines (such as Bing and Google) have good coverage of government webpages so you may be able to leverage them for your site search. There are several options to leverage commercial search indexes.
- General Services Administration’s USASearch—Hosted search service with on demand indexing (free)
- Google Custom Search—Hosted search service (free)
- Google Site Search—On-demand indexing service (price varies based on document count)
- Microsoft Bing—API for developers (free)
Another option is to use the the built-in search tools that come with their content management systems, such as Drupal, Joomla, Percussion, SharePoint, Vignette, and WordPress.
Several enterprise search tools have very robust feature sets that give you precise control over the search experience, but are expensive to license. Other options are more cost effective in terms of licensing, but can require knowledge of search technology and extensive development effort.
In this context, USASearch is an important option for government agencies to consider. The General Services Administration built a commercial-grade search engine for USA.gov and shares this government-centric search technology for use on any federal, state, local, tribal, and territorial government website—at no cost.
* This list is by no means comprehensive and does not imply an endorsement of these products or services.
Improve: Provide relevant results
Use editorial options provided in your search tools to promote best bets content, provide type-ahead search suggestions, define synonyms, and index your content.
Iterate and improve your search results by better organizing your content. Publish what your customers want, when they want it, and in plain language words that they use.