How search works
Mintlify’s search indexes:- Page titles and descriptions
- Headings (H1, H2, H3)
- Body content
- Code block titles
- Component content
- Relevance: How well the query matches the content
- Title matches: Exact matches in titles rank higher
- Heading matches: Matches in headings rank higher than body text
- Recency: Recently updated pages may rank higher
Optimize page metadata
Write descriptive titles
Good titles:- “Install the CLI”
- “Configure authentication”
- “Troubleshoot build errors”
- “Getting Started” (too generic)
- “Page 1” (not descriptive)
- “CLI” (too short)
Add meaningful descriptions
Descriptions appear in search results and help users decide if a page is relevant. Good description:Use relevant keywords
Add keywords to frontmatter for better discoverability:Structure content for search
Use clear headings
Break content into sections with descriptive headings:Front-load important information
Place key information early in your content: Good:Use natural language
Write how users search. If users search “how to deploy”, use that phrase in your content:Improve content discoverability
Create overview pages
Add overview pages for major sections:Add cross-references
Link related pages to improve navigation:Use synonyms
Include alternative terms users might search for:Optimize for common queries
Answer questions directly
Structure content to answer common questions:Include troubleshooting
Add troubleshooting sections for common issues:Document error messages
Include actual error messages users might search for:Technical optimization
Keep pages focused
Each page should cover one topic thoroughly rather than multiple topics superficially. Good structure:Use descriptive URLs
Page paths affect search relevance: Good:Avoid duplicate content
Don’t repeat the same information across multiple pages. Instead:- Create one authoritative page
- Link to it from other pages
- Use snippets for shared content
Search best practices
Include code examples
Code examples improve search results for technical queries:Install with pnpm
Use tables for comparisons
Tables help users find specific information:Monitor search performance
Check search analytics
Review search queries in your analytics to:- Identify common searches
- Find gaps in documentation
- Discover confusing terminology
Test your search
Regularly search for common terms to verify:- Relevant pages appear in results
- Results are ranked appropriately
- No broken links in results
Update based on feedback
If users report difficulty finding information:- Review the page’s title and description
- Add relevant keywords
- Improve heading structure
- Add cross-references
Common search issues
Page not appearing in results
Causes:- Page not in navigation (hidden pages aren’t indexed)
- Missing or poor title/description
- Recently published (wait 5-10 minutes for indexing)
- Add page to navigation in
docs.json - Improve frontmatter metadata
- Redeploy to trigger reindexing
Wrong pages ranking high
Causes:- Generic titles across multiple pages
- Keyword stuffing
- Duplicate content
- Make titles more specific
- Use natural language
- Consolidate duplicate content
Search showing outdated content
Causes:- Search index not updated
- Cached results
- Redeploy your documentation
- Wait 10-15 minutes for index update
- Clear browser cache
Checklist
Use this checklist for each page:- Descriptive, unique title
- Clear, concise description
- Relevant keywords in frontmatter
- Clear heading structure (H2, H3)
- Important information early in content
- Natural language matching user queries
- Cross-references to related pages
- Code examples with context
- Alt text on images
- Focused on one topic
- Descriptive URL path