Skip to content

robots.txt missing in /public (Pages Router)

Pages Router has no Metadata API for robots. The only way to serve /robots.txt is through the /public directory. Without it, crawlers have no guidance and may index API routes, admin paths, or staging content.

Create public/robots.txt.

User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml

Replace https://example.com with your actual domain. Add Disallow rules for any paths that should not be indexed.

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

Confirm the response is 200 OK. Then re-run orino audit.