Skip to main content
U.S. flag

An official website of the United States government

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Https

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Metadata and tags you should include in your website

Search.gov, like other search engines, relies on structured data to help inform how we index your content and how it is presented in search results. You should also read up on the metadata and structured data used by Google and Bing.

Including the following tags and metadata in each of your pages will improve the quality of your content’s indexing, as well as results ranking. We also encourage you to read about more HTML5 semantic markup you can include in your websites.

This page will be updated over time as we add more tag-based indexing functions and ranking factors to our service.

Details on what we index for PDFs can be found in our PDF Metadata documentation.

Fields by Type

Standard Fields OpenGraph Fields DublinCore Fields
<main> og:title dcterms.keywords
<title> og:description dc.subject
description article:section dcterms.subject
keywords article:tag dcterms.audience
robots article:published_time dc.type
  article:modified_time dcterms.type
  og:image dc.date
    dc.date.created
    dcterms.created

Main Page Content

We look for the following fields:

<main>
<div role="main">
  • Detail: Allows the search engine to target the actual content of the page and avoid headers, sidebars and other page content not useful to search. Read more about the <main> element.
  • Data Gathering Logic: If the <main> tag is present, we will use that field. If not, we will take the first HTML element with a role="main". If neither <main> nor role="main" are present, we will capture all content in the <body> tag. If none of those tags are present, we index everything in the <html> tag.
  • Used In: Query matching, term frequency scoring

Title

We look for the following fields:

<title>
<meta property="og:title" content="Example" />
  • Detail: Unique title of the page. If you want to include the agency or section name, place that after the actual page title. We use the og:title property as the result title if it appears to be more substantive than the <title> tag. Note, Open Graph elements are used to display previews of your content in FaceBook and some other social media platforms.
  • Data Gathering Logic: We collect both fields, and use whichever is longer in search results. If both are blank, we will use the URL as the title of the document.
  • Used In: Query matching, term frequency scoring

Description

We look for the first instance of the following fields:

<meta property="og:description" content="Example" />
<meta name="description" content="Example" />
<meta name="dc.description" content="Example" />
  • Detail: Your well crafted, plain language summary of the page content. This will often be used by search engines in place of a page snippet. Be sure to include the keywords you want the page to rank well for. Best to limit to 160 characters, so it will not be truncated. Read more technical background and guidance. Note, Open Graph elements are used to display previews of your content in FaceBook and some other social media platforms.
  • Used In: Query matching, term frequency scoring

Tags & Keywords

We look for the following fields:

<meta name="keywords" content="example, example 2, example 3" />
<meta name="dcterms.keywords" content="example" />
<meta name="dc.subject" content="example" />` 
<meta name="dcterms.subject" content="example" />
<meta name="article:tag" content="example" />
<meta name="article:section" content="example" />
  • Detail: While not often used by commercial search engines due to keyword stuffing, Search.gov indexes your keywords, if you have added them.
  • Data Gathering Logic: We pull all fields listed into one “Tags” field for searching and faceted search (metadata-driven results filtering). We also dedupe keywords so that our Tags field only contains unique terms. Each keyword will be treated as a unique term when searching and filtering content.
  • Used In: Query matching, term frequency scoring, faceted search (metadata-driven results filtering, currently available via the Results API)

Created Date

We look for the following fields:

<meta property="article:published_time" content="YYYY-MM-DD" />
<meta name="dc.date" content="YYYY-MM-DD" />
<meta name="dc.date.created" content="YYYY-MM-DD" />`  
<meta name="dcterms.created" content="YYYY-MM-DD" />
  • Detail: The date fields are listed in order of preference. We only accept one created date, and use this list to determine the fallback options. Exact time is optional; read more technical background and guidance.
  • Used In: Page freshness scoring, faceted search (metadata-driven results filtering, currently available via the Results API)

Changed Date

We look for the following field:

<meta property="article:modified_time" content="YYYY-MM-DD" />
  • Detail: Exact time is optional; read more technical background and guidance.
  • Used In: Page freshness scoring, faceted search (metadata-driven results filtering, currently available via the Results API)

Robots meta tag - Crawling directive

We look for the following field:

<meta name="robots" content="..., ..." />
  • Detail: Use the meta robots tag to block the search engine from indexing a particular page.
  • Used In: Used during indexing, does not affect relevance ranking.

Thumbnail Image

We look for the following field:

<meta property="og:image" content="https://example.gov/my-image-url.jpg" />
  • Detail: An image associated to the content. Ideally, this image serves well as a thumbnail on both our search results page and on social media platforms.
  • Used In: Results page display (upcoming feature for hosted results, currently available via the Results API)

Audience

We look for the following field:

<meta name="dcterms.audience" content="example">
  • Detail: The intended audience of the page.
  • Used In: Query matching and faceted search (metadata-driven results filtering, currently available via the Results API)

Content Type

We look for the following fields:

<meta name="dc.type" content="example">
<meta name="dcterms.type" content="example">
<meta name="og:type" content="example">
  • Detail: The content type of the page. We combine these fields into one “Content Type” field for searching and filtering.
  • Used In: Faceted search (metadata-driven results filtering, currently available via the Results API)

Search.gov Custom Fields

We look for the following fields:

<meta name="searchgov_custom1" content="..., ..., ...">
<meta name="searchgov_custom2" content="..., ..., ...">
<meta name="searchgov_custom3" content="..., ..., ...">
  • Detail: These fields can support any text content that you want to offer in your faceted search options (metadata-driven results filtering). The fields accept single values or list-type content. Each listed value will be treated as a unique term when searching and filtering content.
  • Used In: Query matching, faceted search (currently available via the Results API)