Link to the code that reproduces this issue
https://github.com/christiancenti/reproduction-sitemap-bug
To Reproduce
- Use MetadataRoute.Sitemap to generate a sitemap with language alternates in Next.js.
- Inspect the resulting sitemap XML.
- Submit the sitemap to Google Search Console.
- Observe the "incorrect namespace" error.
Current vs. Expected behavior
Current:
The sitemap XML generated by the Next.js Metadata system uses https in the namespace declarations:
This causes Google Search Console to report an "incorrect namespace" error.
Expected:
The generated sitemap XML should use the official http namespaces as per spec:
Google Search Console should accept the sitemap without namespace errors.
Provide environment information
Relevant Packages:
next: 15.4.0-canary.129
Additional context
Thank you for your help!
Link to the code that reproduces this issue
https://github.com/christiancenti/reproduction-sitemap-bug
To Reproduce
Current vs. Expected behavior
Current:
The sitemap XML generated by the Next.js Metadata system uses
httpsin the namespace declarations:This causes Google Search Console to report an "incorrect namespace" error.
Expected:
The generated sitemap XML should use the official
httpnamespaces as per spec:Google Search Console should accept the sitemap without namespace errors.
Provide environment information
Relevant Packages:
next: 15.4.0-canary.129
Additional context
Thank you for your help!