Next.js Discord

Discord Forum

Nextjs 14 dynamic Sitemap with i18n without adding all routes by hand

Unanswered
Grass carp posted this in #help-forum
Open in Discord
Grass carpOP
Hey,
Is it possible to create a dynamic sitemap in nextjs14 without adding all routes by hand? I use i18n for multilang and don't want to add all routes by hand.

Should be like
ac.me/de/blog
ac.me/en/blog
....

7 Replies

@Ray you could try this package https://www.npmjs.com/package/next-sitemap
Grass carpOP
is it better to have a sitemap for everything or one for the normal and one for the posts and users
@Grass carp is it better to have a sitemap for everything or one for the normal and one for the posts and users
a sitemap should not have more than 50000 url and the size is larger than 10mb
you could just use one if your site isn't that big and want to keep it simple
Grass carpOP
and if I have multiple I can add all to google search console and all will get indexed?
@Grass carp and if I have multiple I can add all to google search console and all will get indexed?
if you have multiple sitemap, you need to create a sitemap index and you can submit it to google search console