Problem with netlify auto-generated sitemap plugin

I am finding a problem with the sitemap plugin of netlify
Every time i try to find the sitemap at
https://mycodenotein.netlify.app/sitemap.xml

I find page not found at the link
Then when i downloaded the deployed files from netlify the sitemap was found to be in
https://mycodenotein.netlify.app/opt/build/repo/sitemap.xml

I want the sitemap in the root directory only
And according to me the sitemap is wrong due to the wrong directory
as google says that sitemap must not contain urls in parent directories
I think thats the cause of wrong sitemap

And i had downloaded the plugin from netlify directly as my website is very simple and static

Hi, @Vikas-Maur. The publish directory is set to “/” which is the root of the filesystem not the repository.

Change the publish directory to blank (or “.”), deploy again, and this should resolve the issue. If it does not resolve it or if there are other questions, please let us know.

Thanks for the answer but it did not help me out
I changes the publish directory to ‘.’
but nothing happened

Please solve my problem

hi @Vikas-Maur, can you post a screenshot of your build settings, please?

help

This is the screenshot of my build settings

It looks like that sitemap is coming from this build plugin:

Would you please try setting buildDir = "." in netlify.toml?

This is in the plugin installation instructions above but doesn’t appear to have been done for this site.

Please tell me how to get to that netlify.toml file

Hi, @Vikas-Maur. We don’t make a netlify.toml file automatically. You would need to add one to your repository yourself.

If you have already done so, I cannot see it because I have no access to the private repo this site uses. If creating this file doesn’t resolve the issue, would you pleas post the file used here?

You can private message (PM) that to one of our support staff and I’ve confirmed that PMs are enabled for your community login. Note, that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.

@Vikas-Maur you can simply create a file named netlify.toml in root directory and put the following content. For more advanced options you can read more here: GitHub - netlify-labs/netlify-plugin-sitemap: Automatically Generate sitemaps on build

        [[plugins]]
        package = '@netlify/plugin-sitemap'
          [plugins.inputs]
          buildDir = "."

hi. i dont need to create netlify.toml right if i have enabled the netlify sitemap plugin? but it still doesnt generate the sitemap.

@chitgoks Please try and keep all your questions/discussion around your sitemap issues to your newly created thread here: