Skip to main content
In this article, you’ll learn fundamental strategies to optimize your documentation SEO.

Content basics

Make your writing and structure easy for search engines to scan.
  • Headings and subheadings: Use clear H1, H2, and H3 to structure your content. Include keywords in these headings when relevant.
  • Short paragraphs and bullet points: Break down large chunks of text into easily digestible sections. Use bullet points and numbered lists where appropriate.
  • Internal linking: Link to related content using descriptive anchor text. For example, “Learn more about rate limiting” instead of “Click here.”

Technical SEO basics

Once your content is optimized, it’s important to ensure your documentation performs well from a technical standpoint. These basic technical SEO practices help make your docs more discoverable:
  • Meta titles and descriptions: Craft SEO-friendly titles (50-60 characters) and descriptions (150-160 characters) for each page. If you’re using Mintlify, meta tags are automatically generated, but it’s still worth checking to ensure they align with your content goals.
  • Alt text for images: Provide descriptive alt text for images with relevant keywords. For example, “OAuth 2.0 API authentication flow” instead of just “diagram.” This enhances SEO and accessibility.
  • Mobile optimization: Make sure your documentation is mobile-friendly. A responsive site improves both user experience and SEO performance.
  • Sitemaps: Ensure your sitemap is up-to-date. Most platforms, like Mintlify, automatically generate a sitemap for you. However, if your platform doesn’t, you may need to create one manually. Once created, search engines will eventually index it on their own, but you can also submit it directly to Google Search Console to speed up the process.

Advanced: Page performance

Use tools like Google PageSpeed Insights to identify areas for technical SEO improvement. Examples of more advanced optimizations:
  • Optimize media for speed: Compress images using formats like WebP or AVIF and ensure your pages load quickly (ideally under 3 seconds).
  • Structured data (schema markup): Add schema markup (like HowTo, FAQ) to your pages to help search engines better understand and rank your content.

Advanced: Keyword research

If organic traffic is critical for you, it’s worth investing some time into understanding which keywords might help users land on your docs.
  • Keyword research: Use free tools like Google Keyword Planner or Keywords Everywhere (tutorial on how to research) to identify common phrases or long-tail keywords. For example, “debug Python API errors.”
  • Integrate keywords naturally: Sprinkle these keywords naturally into headings, subheadings, and throughout the body text. Don’t overstuff keywords—focus on context.
While not necessary, this will help you attract organic search traffic and make your docs easier to find for people searching for specific problems.

Answer engine optimization (AEO)

Answer engine optimization focuses on optimizing content for AI-powered search experiences like ChatGPT, Google AI Overviews, Perplexity, and other AI assistants. As more users get answers from AI rather than traditional search results, AEO is as important as traditional SEO.

AEO best practices

Use clear, descriptive headings: Headings help AI systems understand content structure and locate relevant information. Avoid clever or vague headings. “Rate limiting” is better than “Keeping things under control.” Define terms and concepts clearly: The first time you introduce a concept, define it explicitly. Don’t assume the AI or the user on the other end knows what “webhook” or “idempotency” means. Clear definitions improve both AI retrieval and comprehension. Include specific examples: Provide concrete code examples, sample requests and responses, and real-world use cases. AI assistants can use these to help users implement solutions. Make examples complete and runnable when possible. Provide complete, self-contained answers: Each section should be understandable on its own. AI systems often retrieve individual sections without full page context. Include necessary background information or link to prerequisite content. Structure data logically: Use tables, lists, and other structured formats appropriately. Well-structured content is easier for AI systems to parse and present accurately. Be explicit about prerequisites and requirements: State clearly what users need before starting. Document errors and edge cases: Explain what happens when things go wrong. Document common error messages, their causes, and solutions. Keep content current: Mark deprecated features clearly. Remove outdated information.