-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Issue Next 14 generate a localized sitemap #66167
Comments
Yeah, I have this to. Even copying exact example from docs gives this issue I managed to track down it to the
If I remove |
They also not update the I am using next@14.1.4 got TS type error and then update next to 14.2.3 but got wrong https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#version-history |
I'm having same issue, |
VI aqui que se voce acessar view-source:http://localhost:3000/sitemap.xml o site map na verdade esta sendo gerado corretamente, se tu olhahr tambem o network response, aparentemente esta sendo gerado corretamente, mas não tenho certeza. |
It needs to follow the spec of google international sitemap docs: https://developers.google.com/search/docs/specialty/international/localized-versions The XML is valid for crawler to read and the content type is expected. It's only the view source panel is not correctly displaying that content properly. If you have other problems about crawler indexing the sitemap with errors, please let us know. |
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. |
What is the update you wish to see?
I am experiencing an issue with the sitemap generation using the alternates key for localized URLs.
here is the link : https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap
Is there any context that might help us understand?
The generated XML does not reflect the expected format when alternates are included.
However, when I remove the alternates key, the sitemap is generated correctly.
To Reproduce
Steps to reproduce the behavior:
Here is the code used:
Expected behavior
The generated XML sitemap should correctly reflect the alternate language URLs.
Actual behavior
The XML sitemap does not format the alternate language URLs as expected. Instead, it shows an incorrect structure.
Screenshots
With alternates (incorrect format):
Without alternates (correct format):
System information
OS: Windows
Browser: Chrome
Version of Next.js: 14.2.3
Version of Node.js: 21.7.1
Additional context :
I am unsure whether this is a bug in the implementation or a documentation issue. Please advise if there is an alternative way to achieve the correct sitemap structure with alternates or if this feature can be improved.
Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap
The text was updated successfully, but these errors were encountered: