Files
mypage/app/robots.ts
RJ 3d79cab89a
Some checks failed
Build and Deploy Next.js Blog to Production / 🔍 Code Quality Checks (push) Failing after 18s
Build and Deploy Next.js Blog to Production / 🏗️ Build and Push Docker Image (push) Has been skipped
Build and Deploy Next.js Blog to Production / 🚀 Deploy to Production (push) Has been skipped
📄 production optimizations
2025-12-02 12:39:11 +02:00

19 lines
474 B
TypeScript

import { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3030'
return {
rules: {
userAgent: '*',
allow: '/',
disallow: [
'/api/', // Disallow API routes (if any)
'/_next/', // Disallow Next.js internals
'/admin/', // Disallow admin (if any)
],
},
sitemap: `${baseUrl}/sitemap.xml`,
}
}