Files
einfach-produktiv/app/robots.ts
T
Marco 06fee1739d Add auto-updating sitemap.xml and robots.txt
Sitemap combines hardcoded static routes with Payload's Pages and
published Posts collections (hourly ISR revalidation), so new CMS
pages/blog posts appear without a code change. Excludes noindex
transactional routes (checkout, cart, bestellbestaetigung,
newsletter-confirmed, konto/*) to avoid Search Console warnings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
2026-08-29 21:28:42 +00:00

17 lines
452 B
TypeScript

import type { MetadataRoute } from "next";
const SITE_URL = "https://einfach-produktiv.mk360.de";
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: "*",
allow: "/",
disallow: ["/checkout", "/cart", "/konto", "/bestellbestaetigung", "/newsletter-confirmed", "/email-preview", "/company-settings-preview", "/api"],
},
],
sitemap: `${SITE_URL}/sitemap.xml`,
};
}