import { MetadataRoute } from 'next'; export default function robots(): MetadataRoute.Robots { const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'; return { rules: [ { userAgent: '*', allow: '/', disallow: ['/api/', '/_next/', '/admin/'], }, { userAgent: ['GPTBot', 'ChatGPT-User', 'Google-Extended', 'Anthropic-ai', 'ClaudeBot', 'Claude-Web', 'PerplexityBot', 'Cohere-ai'], allow: '/', disallow: ['/api/', '/_next/', '/admin/'], }, ], sitemap: `${siteUrl}/sitemap.xml`, host: siteUrl, }; }