# Exclude confidential data

- Check 39.07 · llms.txt and AI formats (experimental) · Experimental
- Source: https://checklist-seo-geo.com/en/llmstxt-ai-formats-experimental/exclude-confidential-data
- Stop llms.txt, llms-full.txt and Markdown versions from publishing drafts, private pages, personal data or secrets: checks, settings and scanning.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/llmstxt-ai-formats-experimental/exclude-confidential-data.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Files for AI (`llms.txt`, `llms-full.txt`, Markdown versions of pages) are public, readable without logging in and designed to be copied into a model's context. They must contain only what any anonymous visitor can already read on the site. Once this check is done, every generated file is built from an allowlist of public pages, and an automatic check blocks publication if it detects a draft, an internal URL, personal data or a secret. The format remains experimental; the risk of a leak, however, is very real.

## Why it matters

A poorly protected private page usually remains hard to find. An `llms-full.txt` file that copies it serves it in plain text, at an address known to every tool that looks for these files.

Three mechanisms explain most leaks:

- **Generators follow rules, not your judgment.** GitBook states that hidden pages are included in `llms-full.txt`: hiding a page only removes it from the published table of contents. Mintlify, by contrast, excludes hidden pages and `noindex` pages, and Rank Math excludes `noindex` content. Two tools, two behaviors: only the file produced is authoritative.
- **Markdown versions bypass display protections.** Content hidden by JavaScript, reserved for subscribers by simple CSS hiding or excluded from snippets with `data-nosnippet` can end up in plain text in a `.md` file generated from the source.
- **Listing a private URL draws attention to it.** Like a `Disallow` line in robots.txt, a link to `/espace-partenaires/` in `llms.txt` reveals that it exists, even if the page requires a login.

Finally, whatever is published can be collected. A training crawler (GPTBot, ClaudeBot) that has fetched the file will not give it back because you corrected it later. Removing data after the fact does not guarantee that it disappears from datasets already compiled.

## What it improves

- **Compliance**: no personal data (customer names, employee emails, case numbers) shared beyond its purpose, as the GDPR (General Data Protection Regulation) requires.
- **Security**: no API keys, tokens, staging URLs or internal addresses exposed.
- **Commercial confidentiality**: no partner pricing, roadmap or unannounced product picked up by an assistant.
- **Reliability of AI answers**: a draft or a test page is not presented as official information.
- **Visibility and ranking**: no effect. This is a risk-control check.

## How to check

Download the published files, then screen them in ten minutes.

**1. Inventory of exposed files:**

```bash
for path in llms.txt llms-full.txt .well-known/llms.txt .well-known/llms-full.txt; do
  printf "%s %s\n" "$(curl -s -o /dev/null -w '%{http_code}' "https://example.com/$path")" "$path"
done
```

A `200` on a file nobody knew existed is the first warning sign: a plugin or a platform may have been generating it for months.

**2. Does every link point to a public, indexable page?**

```bash
curl -s https://example.com/llms.txt \
  | grep -o -E '\]\(https?://[^)]+\)' | sed -E 's/^\]\(//; s/\)$//' | sort -u \
  | while read -r url; do
      code=$(curl -s -o /dev/null -w '%{http_code}' "$url")
      noindex=$(curl -s "$url" | grep -i -c -E '<meta[^>]+noindex')
      printf "%s noindex=%s %s\n" "$code" "$noindex" "$url"
    done
```

Compliant result: `200 noindex=0` on every line. A `401`, a `403` or a redirect to the login page indicates a listed private page. A `noindex=1` indicates a page you excluded from Google but are offering to AI.

**3. Search for sensitive patterns in the full file:**

```bash
curl -s https://example.com/llms-full.txt -o llms-full.txt
grep -n -i -E "staging|preprod|recette|localhost|127\.0\.0\.1|192\.168\.|intranet|confidentiel|brouillon|draft|TODO|ne pas diffuser" llms-full.txt | head -50
grep -o -E "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}" llms-full.txt | sort | uniq -c | sort -rn
```

The second command lists email addresses: only public contact addresses (`contact@`, `support@`) are expected. The first one includes French words (`recette` for the acceptance environment, `confidentiel`, `brouillon` for draft, `ne pas diffuser` for do not distribute): adapt them to your own vocabulary.

**4. Search for secrets** with Gitleaks, free and open source:

```bash
gitleaks dir -v llms-full.txt
```

No leaks found: the file is clean on this point. Repeat steps 3 and 4 on a few `.md` versions of documentation pages.

## How to implement

### Before you start

One rule overrides all others: **what is private is protected by authentication, not by being left out of llms.txt**. If a page can be read without logging in, consider it public, whether listed or not. So start by [protecting private content with authentication](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/protect-private-content-authentication), then apply the allowlist to the AI files.

Content to exclude, and where it hides:

| Category | Examples | Where it slips in |
| --- | --- | --- |
| Unpublished content | drafts, test pages, unannounced products | automatic generation from the CMS, hidden pages |
| Restricted areas | customer account, partner area, internal knowledge base | links entered by hand, the documentation's `llms-full.txt` |
| Personal data | customer names in an unapproved case study, named email addresses, screenshots with real data | documentation examples, “team” pages |
| Technical secrets | API keys, tokens, real sample passwords, signed URLs | code blocks in integration guides |
| Infrastructure | staging URLs, internal IP addresses, server names | files generated on the acceptance environment, relative links resolved on the wrong domain |
| Commercial information | partner pricing, discounts, roadmap | `noindex` pages the generator does not filter out |

For each generator, ask three questions: which pages does it take by default, does it respect `noindex`, does it include hidden pages? Write down the answers; they are useful at every update of the tool.

### WordPress

Versions: WordPress 6.6 and later; Yoast SEO and Rank Math in their November 2026 versions.

- **Rank Math**: `Rank Math SEO > General Settings > Edit llms.txt`. Rank Math states that it excludes `noindex` content. Limit the `Post Types` and `Taxonomies` to public ones: untick technical post types (templates, member pages, private products). Review the `Additional Content` field, where internal links may have been entered by hand.
- **Yoast SEO**: `Yoast SEO > Settings > Site features`, `AI tools` section, `llms.txt` settings (labels from Yoast's English documentation; a translated interface may differ). Choose manual page selection rather than automatic selection if the site contains sensitive content. Yoast does not document how it handles `noindex` pages: check the file produced.
- **Membership plugins** (member areas, online courses): check that no lesson or restricted page appears in `/llms.txt`. A page protected by the plugin often remains published content as far as WordPress is concerned.

After each change, open `https://example.com/llms.txt` and run the checks from the previous section again.

### Shopify

Versions: Yoast SEO app for Shopify, November 2026.

In the Yoast SEO app, open `Settings > Advanced > llms.txt`, then choose `Manual page selection` under the page selection section. Keep only public pages: published product pages, collections, shipping, returns, contact. Exclude pages reserved for business accounts, products hidden from sales channels and password-protected wholesale pages.

### Documentation platforms

Platforms generate `llms.txt`, `llms-full.txt` and `.md` versions without intervention. Their behavior differs:

| Platform | Hidden pages | `noindex` pages | Restricted pages |
| --- | --- | --- | --- |
| Mintlify | excluded | excluded | excluded on a partially authenticated site |
| GitBook | **included** in `llms-full.txt` and accessible through its MCP server | not documented | not documented |
| Docusaurus with `docusaurus-plugin-llms` | depends on the files read in `docsDir` | not documented | not applicable (static site) |

**Mintlify**: do not set `seo.indexing` to `"all"` in `docs.json` if hidden pages contain internal information, because this setting adds them to the files. A custom `llms.txt` file placed at the root of the project replaces the generated file.

**GitBook**: do not rely on hiding. Move internal pages to a separate space, unpublished or published with authentication.

**Docusaurus**: exclude internal directories with `ignoreFiles` in `docusaurus.config.js`:

```js
module.exports = {
  plugins: [
    [
      'docusaurus-plugin-llms',
      {
        generateLLMsTxt: true,
        generateLLMsFullTxt: true,
        ignoreFiles: ['interne/**', 'brouillons/**', '**/_*.md'],
      },
    ],
  ],
};
```

Run `npm run build`, then read `build/llms-full.txt` before deploying.

### Laravel

Versions: Laravel 12 and 13.

Generate the file from a query that keeps only published, public and indexable pages. An allowlist holds up better than an exclusion list, which always forgets the latest section created. In `routes/web.php`:

```php
use App\Http\Controllers\LlmsTxtController;

Route::get('/llms.txt', LlmsTxtController::class);
```

Then `app/Http/Controllers/LlmsTxtController.php`:

```php
<?php

namespace App\Http\Controllers;

use App\Models\Page;
use Illuminate\Http\Response;

class LlmsTxtController
{
    public function __invoke(): Response
    {
        $pages = Page::query()
            ->where('is_published', true)
            ->where('is_indexable', true)
            ->whereNull('restricted_to')
            ->orderBy('position')
            ->get(['title', 'slug', 'excerpt']);

        $lines = $pages->map(function (Page $page): string {
            $url = url($page->slug);

            return "- [{$page->title}]({$url}): {$page->excerpt}";
        });

        $content = "# Example\n\n> Public summary of the site.\n\n## Main pages\n\n{$lines->implode("\n")}\n";

        return response($content, 200, ['Content-Type' => 'text/plain; charset=utf-8']);
    }
}
```

Adapt the column names to your model. Do not serve this route on staging without authentication: `url()` would produce links to the acceptance domain there.

### Apache

Versions: Apache 2.4.

If your build produces `.md` versions for the whole site, block those of private sections. In the `.htaccess` file at the root:

```apache
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(espace-client|partenaires|interne)/.*\.md$ - [F]
</IfModule>
```

The best option is still not to generate these files at all: the rule serves as a safety net.

### Nginx

Versions: Nginx 1.24 and later.

Same safety net, in the `server` block:

```nginx
location ~ ^/(espace-client|partenaires|interne)/.*\.md$ {
    return 404;
}
```

On staging, protect the whole site with authentication, AI files included: see [protect staging and private data with authentication](https://checklist-seo-geo.com/en/indexing-canonicalization/protect-staging-private-data-authentication). Reload: `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare dashboard, Pro, Business and Enterprise plans, November 2026.

The Markdown for Agents feature converts HTML pages requested with the `Accept: text/markdown` header into Markdown ([`Agent Readiness > Markdown for Agents`](https://dash.cloudflare.com/?to=/:account/:zone/agent-readiness/markdown-for-agents)). It converts whatever the origin returns for the request: it does not make public a page that requires a login, but it exposes in plain text everything in the HTML, including text hidden by CSS.

Two precautions:

- **Limit the scope**: rather than turning the feature on for the whole zone, turn it on with a configuration rule restricted to public paths, for example `http.host eq "docs.example.com"`.
- **Align the content signal**: by default, converted responses carry the `Content-Signal: ai-train=yes, search=yes, ai-input=yes` header, unless the origin sends its own `content-signal` header. If your policy refuses training, send that header from the origin.

> **Warning:** these headers and files express a preference or a selection. They do not technically prevent anyone from reading a public page.

### Automatic check before publishing

Add the scan to deployment: the build fails if a secret or a forbidden pattern appears in the generated AI files.

```bash
#!/usr/bin/env bash
set -euo pipefail

files=(public/llms.txt public/llms-full.txt)

for file in "${files[@]}"; do
  gitleaks dir --no-banner --redact "$file"
done

if grep -n -i -E "staging\.|preprod|localhost|intranet|brouillon|ne pas diffuser" "${files[@]}"; then
  echo "Forbidden pattern found in the AI files." >&2
  exit 1
fi
```

Adapt the paths (`build/` for Docusaurus, `public/` for most frameworks) and the list of patterns to your internal vocabulary: project code names, acceptance domain, name of the ticketing tool.

## Common mistakes

- **Relying on hiding or `noindex`**: depending on the tool, a hidden or `noindex` page still ends up in `llms-full.txt`.
- **Generating the files on staging** and then copying them to production: they contain the acceptance domain.
- **Listing a protected page “for information”**: the link reveals the restricted area without giving anything to an agent, which will not be able to read it.
- **Leaving real secrets in code examples**: use obvious dummy values (`sk_test_XXXX`) and rotate any key already published.
- **Fixing the file without purging the cache**: the CDN keeps serving the old version.
- **Forgetting the `.md` versions**: people review `llms.txt`, but not the hundreds of Markdown files generated alongside it.

## Frequently asked questions

### Are llms.txt and llms-full.txt files public?

Yes, llms.txt and llms-full.txt are public files, served without login at an address every tool knows. Anyone can read them, training crawlers can collect them and an assistant can copy them into an answer. Put in them only information already readable by an anonymous visitor to the site, and protect private content with authentication rather than by leaving it out of the file.

### Does GitBook include hidden pages in llms-full.txt?

Yes, GitBook states that hidden pages are included in llms-full.txt and remain accessible through the published site's MCP server: hiding only removes the page from the table of contents. To keep an internal page from being exposed, place it in an unpublished space or one protected by authentication. Mintlify, by contrast, excludes hidden pages and noindex pages.

### Is removing a page from llms.txt enough to protect it?

No, removing a page from llms.txt does not protect it. If it remains accessible without logging in, it can be found through the sitemap, an internal link or a crawler, and read by any agent. The llms.txt file is a selection, not an access control. For a truly private page, require server-side authentication, then check that it returns 401 or 403 to an anonymous request.

### How do I detect an API key in llms-full.txt?

Download llms-full.txt and run it through a secret scanner such as Gitleaks or TruffleHog, two open-source tools that recognize common key formats. Add a search for patterns specific to your company: staging domain, project code names, “confidential” mentions. Integrate this scan into deployment to block publication as soon as a leak is detected, then revoke any key already exposed.

## Resources

- [llmstxt.org: the llms.txt proposal](https://llmstxt.org/)
- [GitBook: LLM-ready docs](https://gitbook.com/docs/getting-started/llm-ready-docs)
- [Mintlify: llms.txt](https://www.mintlify.com/docs/ai/llmstxt)
- [docusaurus-plugin-llms: configuration options](https://rachfop.github.io/docusaurus-plugin-llms/docs/configuration)
- [Rank Math: llms.txt](https://rankmath.com/kb/llms-txt/) and [Yoast: enable llms.txt](https://yoast.com/help/enable-llmstxt/)
- [Cloudflare: Markdown for Agents](https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/)
- [Gitleaks](https://github.com/gitleaks/gitleaks) and [TruffleHog](https://github.com/trufflesecurity/trufflehog)
- [CNIL (French data protection authority): GDPR principles](https://www.cnil.fr/fr/reglement-europeen-protection-donnees)

Next steps: [evaluate llms-full.txt for documentation](https://checklist-seo-geo.com/en/llmstxt-ai-formats-experimental/evaluate-llms-fulltxt-documentation), [evaluate Markdown versions](https://checklist-seo-geo.com/en/llmstxt-ai-formats-experimental/evaluate-markdown-versions) and [keep the file up to date](https://checklist-seo-geo.com/en/llmstxt-ai-formats-experimental/keep-file-up-date).
