Skip to content

robots.ts or robots.txt missing (App Router)

No app/robots.ts and no public/robots.txt. Without a robots file, crawlers have no guidance. Googlebot may crawl and attempt to index API routes, admin paths, or staging content.

The preferred approach for App Router is app/robots.ts. Next.js generates and serves it at /robots.txt automatically.

app/robots.ts
import type { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
},
sitemap: 'https://example.com/sitemap.xml',
}
}

Replace https://example.com with your actual domain. Add paths to disallow for any routes you want to keep out of search results.

Terminal window
curl -I https://yourdomain.com/robots.txt

Confirm the response is 200 OK. View the response body to confirm the content is correct. Then re-run orino audit.