Next.js · Junior · Question 53 of 75
Which file controls the /robots.txt response?
- ✓Correct answer:
app/robots.ts(or a staticapp/robots.txt) - 2
public/robots.json - 3The
robotskey inpackage.json
Explanation
robots.ts returns an object of type MetadataRoute.Robots with rules and an optional sitemap URL, so you can vary rules per environment.