diff --git a/app/robots.ts b/app/robots.ts index 7b6a10a..b397f3a 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -7,7 +7,12 @@ export default function robots(): MetadataRoute.Robots { rules: { userAgent: "*", allow: "/", - disallow: ["/admin/", "/api/", "/edit/", "/status/", "/unsubscribe/"], + // "/admin" without a trailing slash on purpose: robots.txt matches on + // prefix, so "/admin" covers both the dashboard at /admin and everything + // under it, while "/admin/" would leave app/admin/page.tsx crawlable. + // The others have no bare route, only tokenised children, so the slash + // is right for them. + disallow: ["/admin", "/api/", "/edit/", "/status/", "/unsubscribe/"], }, sitemap: `${siteUrl}/sitemap.xml`, };