From dc5c2d62c645a320dcea8d4527c4cdc0d42566a0 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Wed, 21 Oct 2026 13:51:05 +0000 Subject: [PATCH] feat(site): serve /sitemap.xml and /robots.txt Both were 404s. List the public pages and keep account, checkout and API paths out of the index. Co-Authored-By: Claude Opus 5.5 --- apps/site/app/robots.ts | 12 ++++++++++++ apps/site/app/sitemap.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 apps/site/app/robots.ts create mode 100644 apps/site/app/sitemap.ts diff --git a/apps/site/app/robots.ts b/apps/site/app/robots.ts new file mode 100644 index 0000000..f570b5b --- /dev/null +++ b/apps/site/app/robots.ts @@ -0,0 +1,12 @@ +import type { MetadataRoute } from "next"; + +export default function robots(): MetadataRoute.Robots { + return { + rules: { + userAgent: "*", + allow: "/", + disallow: ["/api/", "/account", "/orders", "/library", "/checkout/", "/claim/"], + }, + sitemap: "https://nightcell7.com/sitemap.xml", + }; +} diff --git a/apps/site/app/sitemap.ts b/apps/site/app/sitemap.ts new file mode 100644 index 0000000..d28eb0e --- /dev/null +++ b/apps/site/app/sitemap.ts @@ -0,0 +1,40 @@ +import type { MetadataRoute } from "next"; + +const ORIGIN = "https://nightcell7.com"; + +/** + * Public, indexable pages only. Account, checkout, claim and password pages + * are per-visitor and stay out; /characters/[side] lists the two dossiers. + */ +const PATHS = [ + "/", + "/episodes/false-dawn", + "/multiplayer", + "/downloads", + "/system-requirements", + "/yards", + "/gallery", + "/characters", + "/characters/rook", + "/characters/leila", + "/news", + "/faq", + "/support", + "/status", + "/press", + "/careers", + "/credits", + "/privacy", + "/terms", + "/refunds", + "/licenses", + "/community-guidelines", +]; + +export default function sitemap(): MetadataRoute.Sitemap { + return PATHS.map((path) => ({ + url: `${ORIGIN}${path}`, + changeFrequency: path === "/" || path === "/news" ? "weekly" : "monthly", + priority: path === "/" ? 1 : path === "/episodes/false-dawn" ? 0.9 : 0.5, + })); +}