In a Vue (3.4) app, I have created a robots.txt file at the root of my folder. I have deployed my website with the robots.txt file and I am unable to find it when typing the URL https://www.example.com/robots.txt/ I get a 404.
Question posted in Javascript
A very good W3school tutorial can be found here.
A very good W3school tutorial can be found here.
2
Answers
You need to put it in your public folder. Only stuff in that folder is directly accessible from the web. Hence why css/js files are in there
Put the robots file in
public
folder. You should put any files that you want to access in the build output (production). Read