Skip to main content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Setting up Search.gov for Federalist Sites

For 20 years, GSA’s Search.gov has transformed the public’s search experience on federal government websites. Agencies use our free, shared service to power over 2,000 search boxes on over 30% of federal domains. This page will walk you through the steps required to integrate Search.gov with your Federalist website. Examples are for websites using the Jekyll site template.

You can get everything set up with us before launching your website, except for actually indexing your content. We will index your pages after the website is live.

If you wish to test before launch, you’ll need to publish the website to a publicly accessible domain such as demo.example.gov. You’ll work with your agency’s DNS team to set this up, and then follow the instructions below.

On the Federalist side of things, part 1

  1. Open your _config.yml file in your Federalist repo. In the plugins section, confirm that the jekyll-sitemap gem is in the list. For more information, read the docs here and the instructions for GitHub Pages here.
  2. Discuss and decide which search results page to use. We recommend you use our hosted search results page. You can also pull search results into your website for display. Please note that at this time, pulling search results into your website will result in an incomplete set of search analytics.

On the Search.gov side of things:

  1. Sign up for a user account.
  2. Read our Search Site Launch Guide if you’d like some direction.
  3. Create and configure a search site in our Admin Center, as described in the Search Site Launch Guide. Highlights include:
  4. Request that we index your domain by emailing our team. Note, the site must be publicly available for our indexer to be able to access your content.
  5. Preview your search results once the indexing is complete.

On the Federalist side of things, part 2

  1. Open the _config.yml file in your Federalist repo.
  2. Add your site’s domain to the url field, approximately line 25. Leave this line commented out for now.
    • If you’re testing pre-production, enter your demo domain here, and uncomment the line to allow the XML sitemap to build using the demo domain.
  3. Find the Search.gov configuration section following the navigation and sidebar configuration sections. Add your site handle from the Admin Center to the affiliate line.
  4. If you are using the hosted search results page:
    • Delete the value in the access_key line and/or comment out the line.
    • Set the inline value to false
  5. If you’re pulling search results into your website for display:
    • Go to the Search.gov Admin Center, and find the Activate section, API Access Key. Copy this value to the access_key line in your Federalist _config.yml file.
  6. If you do not want type-ahead search suggestions to appear in your website’s search box, change the suggestions value to false.
  7. When you’re ready to launch your website, you will uncomment the url line, to allow your XML sitemap to build using your production domain. Then, let our team know you’re live and we’ll begin indexing.
    • If you tested using a demo domain, you’ll need to update the url value to be your production domain.