From 2e9e256b59fa375a8f4ac1df76323e878e25618f Mon Sep 17 00:00:00 2001 From: Lacy Morrow Date: Mon, 9 Mar 2026 19:23:24 -0400 Subject: [PATCH] fix: exclude auth, app, and technical routes from sitemap Excludes dashboard, settings, forgot-password, og, trpc, launch, sign-in, sign-up, and api-keys from the generated sitemap. These pages are either behind auth or non-canonical. Fixes Ahrefs 'non-canonical page in sitemap' warning (9 URLs). --- src/app/sitemap.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 8cab10d..9cf9a8e 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -34,7 +34,22 @@ export default function sitemap(): MetadataRoute.Sitemap { const allRoutes = flattenRoutes(routes); // Define routes to exclude from sitemap - const excludedRoutes = ["/api", "/workers", "/sign-out", "/error", "/admin"]; + const excludedRoutes = [ + "/api", + "/workers", + "/sign-out", + "/sign-in", + "/sign-up", + "/error", + "/admin", + "/dashboard", + "/settings", + "/api-keys", + "/forgot-password", + "/og", + "/trpc", + "/launch", + ]; // Filter routes const includedRoutes = allRoutes.filter((route) => {