I am using Node.js. My app is already in production. I created a sitemap.xml in my local directory but it currently identified as Untracked.
There are other answers that pertain to Ruby but I am unfamiliar with the language.
How do I push my file to Heroku?
if you're using ExpressJs, you need to create a route for sitemap and robots.txt
You can use the same procedure for your robots.txt files!
You can now push to Heroku and it will be tracked successfully!