Problem
On Fern-hosted docs sites, docs.yml redirects: rules are matched only for HTML page paths. Requests for .md-suffixed paths (the agent/LLM markdown channel Fern itself advertises in every page header) and .xml paths bypass redirect matching entirely — including rules whose source explicitly carries the suffix.
Worse, an unmatched .md path returns HTTP 200 with a "# Page Not Found" markdown body — a soft 404.
Repro (live site: terra.docs.buildwithfern.com)
redirects: contains - source: "/health-and-fitness-api/quickstart" → fires correctly as 308 for the HTML path.
- Add an explicit rule
- source: "/health-and-fitness-api/quickstart.md" → curl -i .../health-and-fitness-api/quickstart.md still returns 200 with body # Page Not Found\n\nThis page does not exist. (no redirect).
- Same behavior for
.xml sources (e.g. legacy /sitemap-pages.xml rules are ignored).
Why it matters
We're migrating docs.tryterra.co from GitBook (which also advertises "append .md") to Fern on the same host. AI tools and answer engines hold months of .md citations for old paths. Post-cutover every one of them gets a 200 "Page Not Found" — the 200 masks the failure from monitoring and Search Console, and the "Page Not Found" text is what gets ingested where our content used to be. Our HTML redirect table (~880 rules, all verified) can't help because the engine never consults it for these paths.
Asks (in order of preference)
- Apply
docs.yml redirect matching before extension/markdown handling, so .md/.xml-suffixed source rules are honored (we already ship dormant .md twin rules ready for this).
- Failing that, or additionally: return a real 404/410 for unmatched
.md paths instead of 200 — a soft 404 is strictly worse for indexing hygiene and monitoring than an honest miss.
Happy to provide more detail or test a preview build.
Problem
On Fern-hosted docs sites,
docs.ymlredirects:rules are matched only for HTML page paths. Requests for.md-suffixed paths (the agent/LLM markdown channel Fern itself advertises in every page header) and.xmlpaths bypass redirect matching entirely — including rules whosesourceexplicitly carries the suffix.Worse, an unmatched
.mdpath returns HTTP 200 with a "# Page Not Found" markdown body — a soft 404.Repro (live site: terra.docs.buildwithfern.com)
redirects:contains- source: "/health-and-fitness-api/quickstart"→ fires correctly as 308 for the HTML path.- source: "/health-and-fitness-api/quickstart.md"→curl -i .../health-and-fitness-api/quickstart.mdstill returns200with body# Page Not Found\n\nThis page does not exist.(no redirect)..xmlsources (e.g. legacy/sitemap-pages.xmlrules are ignored).Why it matters
We're migrating docs.tryterra.co from GitBook (which also advertises "append
.md") to Fern on the same host. AI tools and answer engines hold months of.mdcitations for old paths. Post-cutover every one of them gets a 200 "Page Not Found" — the 200 masks the failure from monitoring and Search Console, and the "Page Not Found" text is what gets ingested where our content used to be. Our HTML redirect table (~880 rules, all verified) can't help because the engine never consults it for these paths.Asks (in order of preference)
docs.ymlredirect matching before extension/markdown handling, so.md/.xml-suffixedsourcerules are honored (we already ship dormant.mdtwin rules ready for this)..mdpaths instead of 200 — a soft 404 is strictly worse for indexing hygiene and monitoring than an honest miss.Happy to provide more detail or test a preview build.