I’m just learning Express and am trying to determine where exactly to put my sitemap.xml file and my robots.txt file. Do they go in the /public folder? Or do they go in the complete root of my Express application?
Thanks very much,
Chris
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They need to be publically accessible.
publicseems a good spot for that. Those files work because other external services load them from your website. If they aren’t accessible, they don’t do anything.Though, unless you site is very very simple, most dynamic websites generate a
sitemap.xmldynamically. Which means you register a route for it, poll your database for pages/objects that would have pages, and then generate xml based on that info.