Skip to content

docs site: /docs/**.mdx serves an indexable parallel copy of every page with no robots directive #12241

Description

@os-zhuang

One-liner

The /docs/:path*.mdx rewrite (in next.config.mjs, for LLM/agent consumption) serves the full text of every page as text/markdown, 200, with no X-Robots-Tag and no canonical link. That is a second copy of all 403 pages at a crawlable URL.

Measured

$ curl -sI http://localhost:3999/docs/data-modeling/objects.mdx
content-type: text/markdown
(no x-robots-tag)
$ curl -s -o /dev/null -w "%{http_code} %{size_download}\n" http://localhost:3999/docs/data-modeling/objects.mdx
200 28080

Expected

Keep the endpoints — they are the point of the llms.txt / .mdx design and they are how agents read the docs. Just tell search engines which copy is canonical:

  • add X-Robots-Tag: noindex to the .mdx responses (and to /llms.txt, /llms-full.txt), or an HTTP Link: <https://objectstack.ai/docs/…>; rel="canonical" header pointing at the HTML page — pick one and say why in the PR;
  • name llms.txt in robots.txt so agent crawlers find it deliberately (coordinate with the robots/sitemap card, which owns that file).

Note /llms-full.txt is currently 8 MB — worth a line in the PR on whether that should be split or streamed, but do not expand scope into rewriting it.

Acceptance

  • curl -sI /docs/<page>.mdx shows the chosen directive
  • the HTML page is unaffected and still canonicalises to itself
  • robots.txt names both the sitemap and llms.txt

Source

Found in an SEO review of the docs site (apps/docs) run on 2026-08-25, measured against the local dev server and against production. The canonical origin is https://objectstack.ai — maintainer ruling recorded in #10659:

这个仓的文档站规范 URL 是 https://objectstack.ai

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions