Next.js · Junior · Question 53 of 75

Which file controls the /robots.txt response?

Explanation

robots.ts returns an object of type MetadataRoute.Robots with rules and an optional sitemap URL, so you can vary rules per environment.

Further reading

Problem with a question

Next.js · Junior · question 53

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz