Content findability now spans both traditional search engines and robots. Search Engine Optimization (SEO) and writing for Large Language Models (LLMs) both improve page findability. Users now find MongoDB documentation not only through traditional search engines, but also through conversational AI systems, semantic search, and in-product LLM-based help.
This page explains how to structure documentation so that it performs well in both environments. Strong metadata, clear page titles, and consistent terminology improve ranking in search engines and increase accuracy in LLM-powered retrieval.
Important
In addition to this guidance, our content taxonomy improves findability and increases relevance for search queries. To learn more about the instructions and best practices for our content taxonomy, see the Taxonomy tagging instructions.
Page Content
The following principles for writing content for robots apply:
Robots can only see what's on the page. Be explicit.
Exceptions and related topics confuse robots.
Keep content concise and elevate the most important details.
Consider putting all the notes, considerations, and troubleshooting elements to one section at the bottom of the page. Put the most important information at the top of the page.
Use structured data because our directives tell robots the kind of content on the page.
Use placeholder command values at least once on command reference pages. For example, use
db.collectionat least once instead of only a specific sample collection name.Answer user questions using their words.
Include synonyms where appropriate.
To learn more, see Use Writing for Robots Best Practices.
Keywords and Semantic Cues
Traditional search engines rely on keywords. LLMs identify concepts based on how consistently those concepts are named and described across the documentation set.
Important
This guidance makes a distinction between the terms "keywords" and
"keyword meta tags". Here "keywords" are popular search terms added
throughout the content body, and "keyword meta tags" are metadata
specified with the .. meta:: directive. While "keyword meta
tags" are available, some search engines might ignore these tags. To
learn more about "keyword meta tags", see Page Metadata Directives. We
primaily use "keyword meta tags" to supplement our taxonomy. To
learn more about the instructions and best practices for "keyword
meta tags", see the Taxonomy tagging instructions.
SEO Keywords
Use the terms users type into search engines (Google Search Console can provide this).
Add keywords throughout the page copy according to the following best practices:
Take the most concise form of the information that the page conveys and make that the target keyword.
Avoid keywords so broad that they compete with the product page.
Avoid keywords so specific that we miss the actual behavior of our searchers.
Example
If the terms that people search for to try to find a page are "MongoDB Atlas Course", add that phrase in at least one spot. For example, use "This MongoDB Atlas course..." instead of "This Getting Started with Atlas course...".
LLM Semantic Cues
Answer your user's questions with their words.
Be explicit and specific because robots can see only what appears on the page.
Use search and chatbot data to understand what users are looking for and ensure the documentation answers those questions.
Include synonyms where appropriate.
Titles
Page titles strongly influence both search engine ranking and LLM accuracy. A title signals the central concept of the page. Be specific. Brevity is not your friend when it comes to titles. Titles are the most important piece of metadata for a page.
Consider the following principles when you title pages:
Title Length
Titles should include 30-60 characters. Search engines often truncate pages with titles longer than 60 characters. LLMs benefit from concise, explicit phrasing. Titles with fewer than 30 characters convey limited information to search engines, so search engines recommend these pages less often. Search engines might also create a longer page title for pages with titles under 30 characters.
As described in the Page Title Structure subsection, the product name, version number, and "MongoDB Docs" are automatically appended to a title when the title is passed to a search engine. For example, for a v8.0 Server Manual page titled "Install MongoDB", the title is 15 characters long. The full title when passed to a search engine ("Install MongoDB - Database Manual v8.0 - MongoDB Docs") is 53 characters long. The appended additions to the title can add about 18-35 characters to the title, depending on the length of the product name.
Standardization
For pages across MongoDB documentation that cover similar concepts, use consistent wording in the page titles to ensure a consistent user experience.
For example, multiple pages in the documentation cover the Read CRUD operation. You can refer to the Read CRUD operation as a read, find, or query operation. Titles for pages that document the Read operation should use consistent terminology to refer to Read operations, based on the most findable term.
Findability
Use the most relevant keywords in a page title. Pay attention to word order in a page title. Include the most relevant words at the beginning of the title.
When in doubt, search your potential page title in a search engine. The top five search results should resemble the content on your page.
Disambiguation
For pages that cover commands with the same name but different functions, add the command categories to the page titles to differentiate the pages.
For example, count is a database command, aggregation stage, aggregation
operator, and mongosh method. For Server Manual pages, you
can include the command category in the title, like
"count (Database Command)," to differentiate between these pages.
Page Title Structure
The product name, version number, and "MongoDB Docs" are automatically appended to Documentation page titles when the title is passed to a search engine.
For example, a v8.0 Server Manual page titled "Install MongoDB" appears as "Install MongoDB - Database Manual v8.0 - MongoDB Docs" in search engine results.
General Guidelines
Use the following SEO and LLM best practices for page and subsection titles:
Use a maximum of 70 characters.
Include target keywords (the most concise form of the information that the page conveys).
Avoid excessive or irrelevant words (keyword stuffing).
Use unique page titles. Identical titles, even between documentation sets, compete in search results.
Don't include "MongoDB" in a title unless the page is a product landing page.
To learn more, see Titles and Headings.
Alternative Text
Screen readers read alternative text for images aloud so that users can better understand an image. Specify alternative text according to the following SEO best practices:
Use a maximum of 125 characters per image.
Describe the image with sufficient detail to understand what it shows.
If they apply to the image, include keywords (the actual terms that users enter into search engines).
To learn more, see Write for Accessibility.
Descriptions
The description is a snippet that appears under the link in the search results and is essential for SEO. Write these descriptions according to the following best practices:
Use a concise description of the page content that is enticing, if possible.
Emphasize the "why" for using the page.
Use a maximum of 155 characters.
Include target keywords and a call to action (CTA) that prompts the user to complete their desired task.
Example
The following examples use a CTA in the description meta tag:
.. meta:: :description: Use a language analyzer to create search keywords in your Atlas Search index that are optimized for a particular natural language. .. meta:: :description: Use the character filters in an Atlas Search custom analyzer to examine text one character at a time and perform filtering operations. Use unique descriptions for every page.
To learn more, see Page Metadata Directives.