Closed thibault-chausson closed 1 month ago
This just looks like the browser displaying the XML wrong, have you tried to inspect the source?
I'm having the same issue and when I inspect the sitemap it looks correct, but without the alternates it looks like it should
You can see the behaviour here: website I checked on Google Search Console and the sitemap's status is Success so I guess it's working even though it's not being displayed like the usual sitemap. But without the alternates, the sitemap is being displayed correctly.
@damien-schneider You can check this issue, alternate sitemaps seem to be working
Closing per-above as this is working as expected, it seems some XML viewers just have trouble displaying it properly.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/thibault-chausson/bug-sitemap-next
To Reproduce
To reproduce the bug, I copied and pasted the documentation on creating a sitemap with "alternates: language", but during execution with
ppm dev
orppm build
thenppm start
, when I navigated to localhost:3000/sitemap.xml or localhost:3000/sitemap, the sitemap no longer worked correctly. I only got a string returned.Current vs. Expected behavior
The expected result is :
But I get
Provide environment information
Which area(s) are affected? (Select all that apply)
Metadata
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response