sitemap.ts or sitemap.xml missing (App Router)
What this means
Section titled “What this means”No app/sitemap.ts and no public/sitemap.xml. Search engines rely on crawl discovery alone. Newly published pages can take weeks to be indexed, and pages with no inbound links may never appear in search results.
How to fix it
Section titled “How to fix it”Create app/sitemap.ts. Next.js generates and serves the sitemap at /sitemap.xml automatically.
import type { MetadataRoute } from 'next'
export default function sitemap(): MetadataRoute.Sitemap { return [ { url: 'https://example.com', lastModified: new Date(), changeFrequency: 'monthly', priority: 1, }, { url: 'https://example.com/about', lastModified: new Date(), changeFrequency: 'yearly', priority: 0.8, }, ]}For sites with many dynamic pages, fetch from your CMS or database inside sitemap().
import type { MetadataRoute } from 'next'
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { const posts = await getPosts() return [ { url: 'https://example.com', lastModified: new Date() }, ...posts.map(post => ({ url: `https://example.com/blog/${post.slug}`, lastModified: post.updatedAt, })), ]}Verify the fix
Section titled “Verify the fix”curl https://yourdomain.com/sitemap.xmlConfirm the response is valid XML with <urlset> as the root element and lists your pages. Then re-run orino audit.