import type { MetadataRoute } from "next"; import { SITE_URL, absoluteUrl } from "@/lib/seo"; /** * /robots.txt — generated so the host always matches the deployment origin. * * Everything behind auth (the app shell, admin, auth screens), the API surface, * and unlisted share links are disallowed. Those routes also emit a `noindex` * meta tag; robots.txt keeps crawlers from spending budget on them at all. */ export default function robots(): MetadataRoute.Robots { return { rules: [ { userAgent: "*", allow: "/", disallow: [ "/api/", "/admin", "/dashboard", "/episodes", "/series", "/usage", "/billing", "/team", "/api-keys", "/settings", "/sign-in", "/sign-up", "/forgot-password", "/reset-password", // Unlisted, per-episode share links — shareable, never indexable. "/p/", // Proxied analytics tracker + beacon (see next.config.mjs). "/_a/", ], }, ], sitemap: absoluteUrl("/sitemap.xml"), host: SITE_URL, }; }