How to add a robots.txt file to a Next.js project Thanks tostatic file servingin Next.js we can easily add arobots.txtfile. , we would create a new file namedrobots.txtthepublicfolder in the root directory. An example of what you could put in this file would be: ...