From 40711858dda2264a235c9f9ed0f2262f10350c0a Mon Sep 17 00:00:00 2001 From: Flotapponnier <160007691+Flotapponnier@users.noreply.github.com> Date: Sun, 21 Jun 2026 12:53:06 +0300 Subject: [PATCH] fix(seo): serve /llms-full.txt as direct 200, not 307 redirect (#602) The route was redirecting to /api/llm-context, which is fine for permissive clients but breaks: - llms.txt validators (llmstxt-checker fails on non-200) - stricter AI crawlers (Perplexity, some Bing AI variants) that mark non-standard paths returning a redirect as no-content and skip - canonical attribution (AI engines citing the body now point at the internal /api/llm-context path instead of the public /llms-full.txt) Re-exports the GET handler from /api/llm-context so there is a single source of truth for the markdown body. No content change. --- src/app/llms-full.txt/route.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/llms-full.txt/route.ts b/src/app/llms-full.txt/route.ts index ea205e21..b87c0b3f 100644 --- a/src/app/llms-full.txt/route.ts +++ b/src/app/llms-full.txt/route.ts @@ -1,17 +1,17 @@ -import { redirect } from "next/navigation"; +import { GET as buildLlmContext } from "@/app/api/llm-context/route"; export const runtime = "nodejs"; +export const revalidate = 60; /** - * llms-full.txt - the expanded sibling of `/llms.txt` per the emerging - * llmstxt.org convention. We serve the same content as `/api/llm-context` - * (full rankings + methodology for every live benchmark) so an LLM that - * follows the convention finds the rich Markdown view without having to - * know our internal API path. + * llms-full.txt — expanded sibling of /llms.txt per the llmstxt.org + * convention. Serves the same body as /api/llm-context, but directly + * (200 + text/markdown) instead of via redirect. The previous 307 broke + * llms.txt validators and the stricter AI crawlers that do not follow + * redirects on non-standard paths (Perplexity, some Bing AI scrapers), + * which were marking the URL as no-content and skipping the resource. * - * Internal redirect keeps a single source of truth; the `/llms-full.txt` - * URL is what crawlers will look up. + * The canonical for AI citation is now /llms-full.txt itself, not the + * internal /api/llm-context path. */ -export function GET() { - redirect("/api/llm-context"); -} +export const GET = buildLlmContext;