Loading page…
Platform setup guide · Checked 2026-10-24
Next.js App Router lets you generate `/robots.txt` cleanly with `app/robots.ts` (or a `route.ts` when you need custom headers like Content-Signal). Keep trailing slashes exact on private routes so you do not accidentally block public assets.
Free live check of /robots.txt per RFC 9309. No account needed.
No robots.txt file is emitted until you add `app/robots.ts`, `app/robots.txt/route.ts`, or `public/robots.txt`.
Watch out: Prefix matching in robots.txt catches shared prefixes: `Disallow: /app` also blocks `/apple-touch-icon.png`. Always add a trailing slash (`/app/`).
// app/robots.ts
import type { MetadataRoute } from "next";
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: "*", allow: "/", disallow: ["/api/", "/app/", "/admin/"] },
],
sitemap: ["https://yourdomain.com/sitemap.xml"],
};
}Once your crawlers are open, see whether ChatGPT, Gemini, Perplexity and Google AI recommend your brand or your competitors.