A worked example
A fictional site update has an active catalog, a private cart and an unfinished policy page. The launch team should not include all three merely because their routes exist. The sitemap decision follows the approved public indexing plan, while a human-readable page directory can still help visitors navigate useful result pages.
A practical checklist
- Separate route existence from indexing approval. Create an explicit inventory of public pages, their canonical destinations and their launch quality.
- Generate entries from that inventory or published content records. Record real substantive modification dates rather than stamping every URL with the current date on each request.
- Check sample URLs and the submitted file on the final host. Monitor discovery and indexing through appropriate tools instead of interpreting submission as completion.
1. XML sitemap index hygiene and crawl efficiency
An XML sitemap is a critical discovery protocol that informs search engine crawlers which pages are authoritative, permanent, and eligible for public indexing. Including 301 redirects, 404 errors, or noindexed utility pages wastes crawler budget and triggers coverage warnings in Google Search Console. A production sitemap should strictly contain HTTP 200 OK canonical destinations.
2. Sitemap inclusion vs exclusion decision matrix
Use this operational policy to determine which routes belong in your public sitemap:
| Route Category | Sitemap Policy | Technical Reasoning | Verification Check |
|---|---|---|---|
| Canonical Blog & Guides | Include (Priority 0.8) | Core editorial content intended for organic discovery | Self-referencing canonical header and 200 OK |
| Marketplace Directory Pages | Include (Priority 0.9) | Primary commercial landing and filter hubs | Confirmed live inventory and unique metadata |
| Customer Account & Cart | Exclude entirely | Private user sessions behind authentication | Robots meta noindex, nofollow applied |
| 301 Redirect Source URLs | Exclude entirely | Redirects waste crawl budget and cause sitemap errors | Confirm destination URL is listed instead |
3. Dynamic Next.js App Router sitemap generation
Below is a clean Next.js App Router sitemap implementation that dynamically aggregates approved editorial and marketplace routes while filtering out manuscripts and utility pages:
// app/sitemap.ts
import type { MetadataRoute } from "next";
import { buyerGuides } from "@/lib/site/buyer-guides";
import { blogLibrary } from "@/lib/blog/library";
const origin = "https://nameretailer.com";
export default function sitemap(): MetadataRoute.Sitemap {
const guides = buyerGuides
.filter((g) => g.approved)
.map((g) => ({
url: `${origin}/guides/${g.slug}/`,
lastModified: new Date(g.updatedAt),
changeFrequency: "weekly" as const,
priority: 0.8,
}));
const blogs = blogLibrary.map((b) => ({
url: `${origin}/blog/${b.slug}/`,
lastModified: new Date("2026-10-19"),
changeFrequency: "weekly" as const,
priority: 0.7,
}));
return [
{ url: `${origin}/`, lastModified: new Date(), changeFrequency: "daily", priority: 1.0 },
...guides,
...blogs,
];
}4. Sitemap maintenance checklist
Verify these technical criteria on your production sitemap feed:
- Ensure every URL in the sitemap returns HTTP status 200 OK.
- Confirm that every sitemap URL declares a self-referencing canonical tag matching the exact URL.
- Check that sitemap files stay well under the 50,000 URL and 50MB uncompressed limit.
- Verify the sitemap URL is declared cleanly at the bottom of your production robots.txt file.
What to avoid
Avoid listing every filter combination or copying private route names into the sitemap. Do not enable production discovery for a result simply because more articles were added. Confirm sitemap URLs and redirect destinations against the current deployed content.

