An introduction to search

Understand how and why your content must be easy to search

What is search functionality?

Search functionality enables people to find information. Whether they use a commercial search engine, or search within a single website via its search function, searching is a commonplace activity for users.

Commercial search engines scour the internet and deliver results based on the terms someone searches for.

Site-specific search functionality is typically provided via a search box. Some websites display an actual box, whereas others only display an icon (such as a magnifying glass) that expands to allow users to type their query once they’ve selected the icon. The U.S. Web Design System’s Search component usability guidance recommends using a full search box. Specifically, the search function should appear on a site’s home page as a search box instead of a link so users can locate it easily.

If using the Design System’s Header component, you’ll place the search box in the top right corner.

Why is search important for your website?

Most people begin a search for information on a commercial search engine. Once they arrive at a specific website, they’re likely to first review the site navigation. However, if they don’t easily find what they’re looking for, they’ll attempt to search for it using the site’s internal search feature.

You can configure search results to promote popular or top-task content so it’s easier for users to find. Offering clear navigation, as well as easy-to-use search functionality, will accommodate both methods of finding information.

Including a search function on your website offers you a view into how site visitors search for your information. By analyzing search data, you can find common search terms, and rewrite content (particularly headings) to include words that customers typically search for.

Finally, the 21st Century Integrated Digital Experience Act requires that all federal websites and digital services have “Information and services that are discoverable and optimized for search.”

Section III.A.4 of OMB’s policy guidance, M-23-22, Delivering a Digital-First Public Experience, clarifies this requirement, “Agencies’ public-facing websites must contain a search function that allows users to easily search content intended for public use.”

How to improve searchability

Install a search function on your website.

  • Search.gov is a shared service offered by GSA, and free to federal agencies. It’s secure, compliant, and tailored for government use.

Follow search engine optimization (SEO) best practices to help search engines discover your content:

  • Write content that is clear, concise, unique, and authoritative, to increase page rankings on commercial search engines.
  • Use semantic HTML, which helps search engines differentiate types of content on a page, such as the title, description, or headings, delivers more descriptive search results, and increases the effectiveness of assistive technologies, such as screen readers.
  • Properly structure headings. Include only one H1 on a page, and use it for your page title. Use H2, H3, etc. to organize content into sections and subsections.
  • Create an XML sitemap that includes all URLs that you want to be discoverable through search.
  • Create a robots.txt file.
  • Register your site with Bing Webmaster Tools and Google Search Console.

Disclaimer: All references to specific brands, products, and companies are used only for illustrative purposes and do not imply endorsement by the U.S. federal government or any federal government agency.