From a6eaa61ede0581f65fa2c7cf04ba4433bb0f83f7 Mon Sep 17 00:00:00 2001 From: waterlemonnn Date: Sat, 8 Aug 2026 00:48:53 +0700 Subject: [PATCH 1/2] fix(seo): disallow status and unsubscribe token routes in robots.txt Both /status/[token] and /unsubscribe/[token] carry a private token in the URL and are linked from outbound email, same as /edit/[token]. Add them to the disallow list and normalize /admin to have a trailing slash like the rest. Fixes #57 --- app/robots.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/robots.ts b/app/robots.ts index 8eae56d..7b6a10a 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -7,7 +7,7 @@ export default function robots(): MetadataRoute.Robots { rules: { userAgent: "*", allow: "/", - disallow: ["/admin", "/api/", "/edit/"], + disallow: ["/admin/", "/api/", "/edit/", "/status/", "/unsubscribe/"], }, sitemap: `${siteUrl}/sitemap.xml`, }; From d04244e990964d4ebc30d2b56d9c12b58c9ab2ea Mon Sep 17 00:00:00 2001 From: royalpinto007 Date: Sat, 8 Aug 2026 02:22:19 +0530 Subject: [PATCH 2/2] keep /admin unslashed so the dashboard page stays disallowed robots.txt matches on prefix. "/admin/" only covers paths under it, so app/admin/page.tsx, the dashboard itself, would have become crawlable. "/admin" covers both it and everything beneath. The other four are right as they are: /api, /edit, /status and /unsubscribe have no bare page, only tokenised children. --- app/robots.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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`, };