Next.js Discord

Discord Forum

Need advise on sitemap setup

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Nile CrocodileOP
Currently I have a couple of sitemaps for my website /sitemap.xml, /news-sitemap.xml, /news/sitemap/0.xml, /authors/sitemap/0.xml, /college-football/rankings/sitemap/0.xml. However, I am working on redoing my website and some of the routing. For example, /news no longer exists as it's being moved under /college/[sport]/news. Unfortunately, it looks like sitemap.ts files don't have access to params like page.tsx and route.ts files do. Now currently I am nowhere near the 50,000 URL limit set by Google even if you combined all of my current sitemaps. My main question is... Is there a way to get that dynamic [sport] but have the ability to scale if and when I get to 50,000 URLs per sport? My secondary question would be, should I just chuck everything into the root /sitemap.xml? My only concern there is Google hasn't read that sitemap since 2022.

4 Replies

Nile CrocodileOP
Yea that's one option. However, still doesn't address me wanting a sitemap for each sport we will cover under /college/[sport]/news though.
@Nile Crocodile Yea that's one option. However, still doesn't address me wanting a sitemap for each sport we will cover under `/college/[sport]/news` though.
yeah that im saying is, it doesn't matter where you put it, i think your option looks nice, as long as you reference it in root/sitemap.xml