|
1 | 1 | ---
|
2 |
| -title: 'SEO' |
3 |
| -description: 'Extend default meta tags for better SEO' |
4 |
| -icon: 'search' |
| 2 | +title: "SEO" |
| 3 | +description: "SEO best practices and meta tag configuration for better search visibility" |
| 4 | +icon: "search" |
5 | 5 | ---
|
6 | 6 |
|
7 |
| -The platform automatically generates most meta tags. |
| 7 | +Mintlify automatically handles many SEO best practices, including: |
8 | 8 |
|
9 |
| -However, you can fully customize them by adding the `metatags` field to your `docs.json` or the page's frontmatter. |
| 9 | +- Meta tag generation |
| 10 | +- Sitemap and `robots.txt` file generation |
| 11 | +- Semantic HTML structure |
| 12 | +- Mobile optimization |
| 13 | + |
| 14 | +You can fully customize your site's meta tags by adding the `metatags` field to your `docs.json` or a page's frontmatter. |
10 | 15 |
|
11 | 16 | ## Global meta tags
|
12 | 17 |
|
@@ -35,44 +40,12 @@ title: 'Your Example Page Title'
|
35 | 40 | Meta tags with colons need to be typed with quotes around them when you put them in the page metadata.
|
36 | 41 | </Warning>
|
37 | 42 |
|
38 |
| -## Sitemaps |
39 |
| - |
40 |
| -Mintlify automatically generates a `sitemap.xml` file and a `robots.txt` file. Simply navigate to `/sitemap.xml` to see your sitemap. |
41 |
| - |
42 |
| -Only pages included in your `docs.json` are included by default. To include hidden links, add `seo.indexing` to your `docs.json`: |
43 |
| - |
44 |
| -```json |
45 |
| -"seo": { |
46 |
| - "indexing": all |
47 |
| -} |
48 |
| -``` |
49 |
| - |
50 |
| -## Disabling indexing |
51 |
| - |
52 |
| -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: |
53 |
| - |
54 |
| -``` |
55 |
| ---- |
56 |
| -noindex: true |
57 |
| ---- |
58 |
| -``` |
59 |
| - |
60 |
| -You can also specify `noindex` for all pages in your docs by setting the `metadata.robots` field to `"noindex"` in your `docs.json`: |
61 |
| - |
62 |
| -```json |
63 |
| -"seo": { |
64 |
| - "metatags": { |
65 |
| - "robots": "noindex" |
66 |
| - } |
67 |
| - } |
68 |
| -``` |
69 |
| - |
70 | 43 | ## Common Meta Tags Reference
|
71 | 44 | 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.
|
72 | 45 |
|
73 | 46 | You can preview how your meta tags will appear on different platforms using [metatags.io](https://metatags.io/).
|
74 | 47 |
|
75 |
| -```json |
| 48 | +```json expandable |
76 | 49 | "seo": {
|
77 | 50 | "metatags": {
|
78 | 51 | "robots": "noindex",
|
@@ -165,3 +138,67 @@ You can preview how your meta tags will appear on different platforms using [met
|
165 | 138 | }
|
166 | 139 | ```
|
167 | 140 |
|
| 141 | +## Sitemaps |
| 142 | + |
| 143 | +Mintlify automatically generates a `sitemap.xml` file and a `robots.txt` file. Simply navigate to `/sitemap.xml` to see your sitemap. |
| 144 | + |
| 145 | +Only pages included in your `docs.json` are included by default. To include hidden links, add `seo.indexing` to your `docs.json`: |
| 146 | + |
| 147 | +```json |
| 148 | +"seo": { |
| 149 | + "indexing": all |
| 150 | +} |
| 151 | +``` |
| 152 | + |
| 153 | +## Disabling indexing |
| 154 | + |
| 155 | +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: |
| 156 | + |
| 157 | +``` |
| 158 | +--- |
| 159 | +noindex: true |
| 160 | +--- |
| 161 | +``` |
| 162 | + |
| 163 | +You can also specify `noindex` for all pages in your docs by setting the `metadata.robots` field to `"noindex"` in your `docs.json`: |
| 164 | + |
| 165 | +```json |
| 166 | +"seo": { |
| 167 | + "metatags": { |
| 168 | + "robots": "noindex" |
| 169 | + } |
| 170 | + } |
| 171 | +``` |
| 172 | + |
| 173 | +## SEO best practices |
| 174 | + |
| 175 | +<AccordionGroup> |
| 176 | +<Accordion title="Write descriptive titles and descriptions"> |
| 177 | +- Use clear, descriptive page titles (50-60 characters) |
| 178 | +- Write compelling descriptions (150-160 characters) |
| 179 | +- Include relevant keywords |
| 180 | +- Make each page title and description unique |
| 181 | +</Accordion> |
| 182 | + |
| 183 | +<Accordion title="Optimize your content structure"> |
| 184 | +- Use proper heading hierarchy (H1 → H2 → H3) |
| 185 | +- Write for humans first, search engines second |
| 186 | +- Include relevant keywords in headings and content |
| 187 | +- Keep URLs short, descriptive, and organized hierarchically |
| 188 | +- Break up long content with subheadings and lists |
| 189 | +</Accordion> |
| 190 | + |
| 191 | +<Accordion title="Internal linking strategy"> |
| 192 | +- Link to related pages within your documentation |
| 193 | +- Use descriptive anchor text instead of "click here" |
| 194 | +- Create topic clusters by linking related concepts |
| 195 | +- Use the automatic cross-referencing features |
| 196 | +</Accordion> |
| 197 | + |
| 198 | +<Accordion title="Image SEO"> |
| 199 | +- Use descriptive file names for images |
| 200 | +- Always include alt text for accessibility and SEO |
| 201 | +- Optimize image file sizes for faster loading |
| 202 | +- Use relevant images that support your content |
| 203 | +</Accordion> |
| 204 | +</AccordionGroup> |
0 commit comments