Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ export default function robots(): MetadataRoute.Robots {
// they ignore a single sitemap.xml pointer to an index. Listing
// each sub-sitemap here also keeps coverage if the index is
// temporarily stale at a CDN edge.
// Note: sitemap-products-sg.xml is intentionally omitted — SG product
// pages return 410 Gone (BUY-37747/BUY-37750) and the route returns 410,
// so listing it creates a permanent broken-sitemap reference in GSC.
sitemap: [
"https://buywhere.ai/sitemap.xml",
"https://buywhere.ai/sitemap-pages.xml",
"https://buywhere.ai/sitemap-products.xml",
"https://buywhere.ai/sitemap-products-sg.xml",
"https://buywhere.ai/sitemap-merchants.xml",
"https://buywhere.ai/sitemap-categories.xml",
"https://buywhere.ai/sitemap-compare.xml",
Expand Down
5 changes: 4 additions & 1 deletion src/app/sitemap.xml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ export const runtime = "nodejs";
export async function GET(): Promise<Response> {
const now = new Date();

// Sub-sitemaps listed here. sitemap-products-sg.xml is intentionally
// omitted: SG product slug pages return 410 Gone (BUY-37747/BUY-37750)
// and the /sitemap-products-sg.xml route emits 410, so listing it in the
// index produces a permanent broken-sitemap reference in GSC coverage.
const sitemapEntries = [
{ url: `${SITEMAP_BASE_URL}/sitemap-pages.xml`, lastModified: now },
{ url: `${SITEMAP_BASE_URL}/sitemap-categories.xml`, lastModified: now },
{ url: `${SITEMAP_BASE_URL}/sitemap-compare.xml`, lastModified: now },
{ url: `${SITEMAP_BASE_URL}/sitemap-products.xml`, lastModified: now },
{ url: `${SITEMAP_BASE_URL}/sitemap-products-sg.xml`, lastModified: now },
{ url: `${SITEMAP_BASE_URL}/sitemap-merchants.xml`, lastModified: now },
];

Expand Down