- Meta tag generation
- Sitemap and
robots.txt
file generation - Semantic HTML structure
- Mobile optimization
metatags
field to your docs.json
or a page’s frontmatter.
Global meta tags
To set default meta tags for all pages, add themetatags
field to your docs.json
.
Page-specific meta tags
To set page-specific meta tags, add them to a page’s frontmatter.Meta tags with colons must be wrapped in quotes.
Common meta tags reference
Below is a comprehensive list of meta tags you can add to yourdocs.json
. These meta tags help improve your site’s SEO, social sharing, and browser compatibility.
The
og:image
adds a background image that Mintlify automatically overlays with your logo, page title, and description when generating social media previews.Sitemaps and robots.txt files
Mintlify automatically generates asitemap.xml
file and a robots.txt
file. You can view your sitemap by appending /sitemap.xml
to your documentation site’s URL.
Only pages included in your docs.json
are included by default. To include hidden links, add seo.indexing
to your docs.json
:
Custom sitemaps and robots.txt files
To add a customsitemap.xml
or robots.txt
file, create a sitemap.xml
or robots.txt
file at the root of your project. Adding a custom file will override the automatically generated file of the same name. If you delete a custom file, the default file will be used again.
Disabling indexing
If you want to stop a page from being indexed by search engines, you can include the following in the frontmatter of your page:noindex
for all pages in your docs by setting the metatags.robots
field to "noindex"
in your docs.json
:
SEO best practices
Write descriptive titles and descriptions
Write descriptive titles and descriptions
- Use clear, descriptive page titles (50-60 characters)
- Write compelling descriptions (150-160 characters)
- Include relevant keywords
- Make each page title and description unique
Optimize your content structure
Optimize your content structure
- Use proper heading hierarchy (H1 → H2 → H3)
- Write for humans first, search engines second
- Include relevant keywords in headings and content
- Keep URLs short, descriptive, and organized hierarchically
- Break up long content with subheadings and lists
Internal linking strategy
Internal linking strategy
- Link to related pages within your documentation
- Use descriptive anchor text instead of “click here”
- Create topic clusters by linking related concepts
- Use the automatic cross-referencing features
Image SEO
Image SEO
- Use descriptive file names for images
- Always include alt text for accessibility and SEO
- Optimize image file sizes for faster loading
- Use relevant images that support your content