Gatsby build unable to create a sitemap.xml file on build with gatsby-plugin-sitemap #31758
Replies: 5 comments 2 replies
-
The sitemaps are generated properly when the |
Beta Was this translation helpful? Give feedback.
-
No it is not. |
Beta Was this translation helpful? Give feedback.
-
Same issue as #31515. |
Beta Was this translation helpful? Give feedback.
-
The plugin is working as intended and correctly. Point Google to |
Beta Was this translation helpful? Give feedback.
-
So with the basic Sitemap setup in gatsby-config, it used to auto-generate a sitemap.xml at my websites route. Something seems to have changed recently and this has now stopped working, is there something I now need to add to my config to generate www.my-website.com/sitemap.xml or do I to have to change everything to look at www.my-website.com/sitemap/sitemap-index.xml ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I want to create a sitemap.xml file for my build, however the file doesn't get created. When I serve my build and go to /sitemap.xml , I am met with a 404 page instead of the sitemap.xml file. After building, under /public folder I see a sitemap folder with sitemap-0.xml and sitemap-index.xml files. I can also access these files under the localhost:9000/sitemap/sitemap-0.xml and localhost:9000/sitemap/sitemap-index.xml paths on build. Not sure why these files are there or if they are new replacements.
Steps to reproduce
Minimal Reproduction: https://github.com/Aarya-Patel/gatsby-reproduction
Steps to reproduce:
npm install --legacy-peer-deps
gatsby build && gatsby serve
Expected result
I should see the entire site's sitemap.xml
Actual result
I see a 404 page instead.
Environment
System:
OS: macOS 11.0.1
CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 15.0.0 - ~/.nvm/versions/node/v15.0.0/bin/node
npm: 7.0.2 - ~/.nvm/versions/node/v15.0.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 91.0.4472.77
Safari: 14.0.1
npmPackages:
gatsby: ^3.6.2 => 3.6.2
gatsby-core-utils: ^2.6.0 => 2.6.0
gatsby-plugin-gatsby-cloud: ^2.6.1 => 2.6.1
gatsby-plugin-image: ^1.6.0 => 1.6.0
gatsby-plugin-manifest: ^3.6.0 => 3.6.0
gatsby-plugin-offline: ^4.6.0 => 4.6.0
gatsby-plugin-react-helmet: ^4.6.0 => 4.6.0
gatsby-plugin-sharp: ^3.6.0 => 3.6.0
gatsby-plugin-sitemap: ^4.2.0 => 4.2.0
gatsby-remark-autolink-headers: ^4.3.0 => 4.3.0
gatsby-source-filesystem: ^3.6.0 => 3.6.0
gatsby-transformer-remark: ^4.3.0 => 4.3.0
gatsby-transformer-sharp: ^3.6.0 => 3.6.0
npmGlobalPackages:
gatsby-cli: 3.6.0
Beta Was this translation helpful? Give feedback.
All reactions