does generateSitemaps create sitemap-index.xml ? #61448
Replies: 2 comments 8 replies
-
Apparently it doesn't and we really need it. also we need the dinamic id to be as string so we can name our ssitemap files as we want |
Beta Was this translation helpful? Give feedback.
-
In Next.js 15, there are a couple of improvements that help with this use case:
For large numbers of URLs or highly dynamic content, it’s actually better to skip the generateSitemaps function entirely. Instead, you can: Define your sitemap index explicitly in route.ts. This way you can create multiple index sitemap. Pass your custom string id to the sitemap.ts function to generate the corresponding URL set on demand. This approach avoids doing all the heavy lifting at build time and keeps things performant, especially if your sitemap changes often.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm planning to migrate my sitemap generating part of my project to next.js's feature by dynamically create multiple sitemaps using https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generating-multiple-sitemaps .
If sitemaps are dynamically created, does next.js have the ability to create the sitemap-index.xml ? otherwise the dynamically created sitemaps won't have any links pointing to them, making them unable to be discovered by search engines.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions