Skip to content

Update SEO guide #958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 75 additions & 38 deletions settings/seo.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
title: 'SEO'
description: 'Extend default meta tags for better SEO'
icon: 'search'
title: "SEO"
description: "SEO best practices and meta tag configuration for better search visibility"
icon: "search"
---

The platform automatically generates most meta tags.
Mintlify automatically handles many SEO best practices, including:

However, you can fully customize them by adding the `metatags` field to your `docs.json` or the page's frontmatter.
- Meta tag generation
- Sitemap and `robots.txt` file generation
- Semantic HTML structure
- Mobile optimization

You can fully customize your site's meta tags by adding the `metatags` field to your `docs.json` or a page's frontmatter.

Check warning on line 14 in settings/seo.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

settings/seo.mdx#L14

Did you really mean 'frontmatter'?

## Global meta tags

Expand Down Expand Up @@ -35,44 +40,12 @@
Meta tags with colons need to be typed with quotes around them when you put them in the page metadata.
</Warning>

## Sitemaps

Mintlify automatically generates a `sitemap.xml` file and a `robots.txt` file. Simply navigate to `/sitemap.xml` to see your sitemap.

Only pages included in your `docs.json` are included by default. To include hidden links, add `seo.indexing` to your `docs.json`:

```json
"seo": {
"indexing": all
}
```

## Disabling indexing

If you want to stop a page from being indexed by search engines, you can include the following in the [frontmatter](pages) of your page:

```
---
noindex: true
---
```

You can also specify `noindex` for all pages in your docs by setting the `metadata.robots` field to `"noindex"` in your `docs.json`:

```json
"seo": {
"metatags": {
"robots": "noindex"
}
}
```

## Common Meta Tags Reference
Below is a comprehensive list of meta tags you can add to your `docs.json`. These meta tags help improve your site's SEO, social sharing, and browser compatibility.

You can preview how your meta tags will appear on different platforms using [metatags.io](https://metatags.io/).

```json
```json expandable
"seo": {
"metatags": {
"robots": "noindex",
Expand Down Expand Up @@ -165,3 +138,67 @@
}
```

## Sitemaps

Mintlify automatically generates a `sitemap.xml` file and a `robots.txt` file. Simply navigate to `/sitemap.xml` to see your sitemap.

Only pages included in your `docs.json` are included by default. To include hidden links, add `seo.indexing` to your `docs.json`:

```json
"seo": {
"indexing": all
}
```

## Disabling indexing

If you want to stop a page from being indexed by search engines, you can include the following in the [frontmatter](pages) of your page:

```
---
noindex: true
---
```

You can also specify `noindex` for all pages in your docs by setting the `metadata.robots` field to `"noindex"` in your `docs.json`:

```json
"seo": {
"metatags": {
"robots": "noindex"
}
}
```

## SEO best practices

<AccordionGroup>
<Accordion title="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
</Accordion>

<Accordion title="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
</Accordion>

<Accordion title="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
</Accordion>

<Accordion title="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
</Accordion>
</AccordionGroup>