Metadata
File-based Metadata API:
Robots
Docs
Generated
Can be defined in config based metadata
/app/robots.ts
// we don't have `request` here
export default async function robots(): Promise<MetadataRoute.Robots> {
return {
rules: {
userAgent: '*',
allow: '/',
disallow: '/private/',
},
sitemap: 'https://nextjs13-mvp.vercel.app/sitemap.xml',
};
}