Files
mintlify__docs/organize/hidden-pages.mdx

148 lines
5.5 KiB
Plaintext

---
title: "Hidden pages"
description: "Hide documentation pages from the sidebar navigation while keeping them accessible via direct URL, search, or AI assistant for special use cases."
keywords: ["hide from navigation", "unlisted", "page visibility"]
---
Hidden pages don't appear in your site's navigation, but anyone who knows the URL can still access them. For example, if you create a hidden page like `guides/hidden-page.mdx`, visitors can reach it at `docs.yoursite.com/guides/hidden-page`.
Use hidden pages for content you want users to access or reference as context for AI tools, but don't want listed in the navigation.
If your content requires strict access control, you must configure [authentication](/deploy/authentication-setup).
To restrict pages to specific user groups, set up [group-based access control](/deploy/authentication-setup#control-access-with-groups).
See an [example of a hidden page](/organize/hidden-page-example).
<Note>
Some navigation elements like sidebars, dropdowns, and tabs may appear empty or shift layout on hidden pages.
</Note>
## Hide a page
To hide a page, set `hidden: true` in the page's [frontmatter](/organize/pages) or remove it from your `docs.json` navigation.
### Set `hidden: true` in frontmatter
Add `hidden: true` to a page's frontmatter to remove it from the rendered navigation while still including it in your `docs.json` configuration.
```yaml
---
title: "My hidden page"
hidden: true
---
```
To make a page visible again, remove the `hidden` field entirely. Do not set `hidden: false` as it results in undefined behavior.
<Note>
By default, `hidden: true` excludes a page from search engine indexing, sitemaps, and AI context.
To include it anyway, set `seo.indexing: "all"` in `docs.json`. See [Search, SEO, and AI indexing](https://www.mintlify.com/docs/#search-seo-and-ai-indexing) for details.
Note: `noindex: true` only affects indexing - it does not hide the page from navigation. See [Disable indexing](https://www.mintlify.com/docs/optimize/seo#disable-indexing) for more information.
</Note>
### Remove the page from navigation
If you don't include a page in your `docs.json` navigation, you hide it. This method works well for pages that you don't want to appear in navigation at all.
## Hide a group of pages
To hide a group of pages, set the `hidden` property to `true` for the group in your `docs.json` file:
```json highlight={4}
"groups": [
{
"group": "Getting started",
"hidden": true,
"pages": [
"index",
"quickstart"
]
},
{
"group": "Guides",
"pages": [
"guides/hidden-page.mdx",
"guides/hidden-groups.mdx"
]
}
]
```
In this example, the `Getting started` group is hidden and the `Guides` group is visible.
### Hide a tab
To hide a tab, add the `hidden` property for the tab in your `docs.json` file:
```json highlight={4}
"tabs": [
{
"tab": "Home",
"hidden": true,
"pages": [
"index",
"quickstart"
]
}
]
```
## Keep hidden pages discoverable with `searchable`
By default, hiding a tab, group, anchor, or dropdown also removes its descendant pages from search, the sitemap, `llms.txt`, the AI assistant, and search engine indexing. To hide a navigation element from the sidebar while keeping its pages discoverable, add `searchable: true` alongside `hidden: true`.
Use `searchable: true` when you want a section to be reachable through search, SEO, or AI tools, but not surfaced in the rendered navigation. Common cases include legacy products that should still rank in search results, reference material linked only from other pages, and content that you want the AI assistant to use as context.
```json highlight={4-5}
"tabs": [
{
"tab": "Reference",
"hidden": true,
"searchable": true,
"groups": [
{
"group": "Archived APIs",
"pages": [
"reference/legacy-api",
"reference/deprecated-endpoints"
]
}
]
}
]
```
With this configuration:
- Descendant pages appear in site search and the sitemap.
- Pages are included in `llms.txt` and the AI assistant's context.
- Rendered HTML does not include `<meta name="robots" content="noindex">`, so search engines can index the pages.
- The tab, group, anchor, or dropdown still does not appear in the sidebar navigation.
You can set `searchable: true` on any navigation element that supports `hidden`, including tabs, groups, anchors, and dropdowns. Pages opted in through `searchable` are still reachable by direct URL.
<Note>
`searchable: true` only has an effect when `hidden: true` is also set. On a visible element it does nothing.
</Note>
## Search, SEO, and AI indexing
By default, hidden pages don't appear in indexing for search engines, documentation site search, or as AI assistant context. To include hidden pages in search results and assistant context, add the `seo` property to your `docs.json`:
```json
"seo": {
"indexing": "all"
}
```
### Understanding hidden versus noindex
The relationship between `hidden` and `noindex` is one-directional:
- **`hidden: true` → automatically applies `noindex`**: Hidden pages are automatically excluded from search engines, sitemaps, and AI context.
- **`noindex: true` → does NOT apply `hidden`**: Pages with `noindex: true` remain visible in navigation. They only affect search engine indexing and AI context.
To exclude a specific page from search engines while keeping it visible in navigation, add `noindex: true` to its frontmatter. To hide a page from navigation and search engines, use `hidden: true`.