Skip to content

feat(next): add sitemap index support #61391

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

Draft
wants to merge 4 commits into
base: canary
Choose a base branch
from

Conversation

Fedeorlandau
Copy link

What?

This enables sitemap-index.{.ts|.js|.xml} file that can be used to generate a Sitemap Index based on the Sitemap Index protocol: https://www.sitemaps.org/protocol.html#index

Why?

Next.js supports creating multiple sitemap files. However, it can be tricky to add all these files to the robots.txt file. That's why I added support for sitemap-index where you can dynamically create a sitemap index with all of your dynamic sitemaps.

How?

Added a new metadata file

Fixes #61025

@Fedeorlandau Fedeorlandau requested review from manovotny and delbaoliveira and removed request for a team January 30, 2024 14:38
@ijjk ijjk added area: documentation examples Issue was opened via the examples template. type: next labels Jan 30, 2024
<loc>https://acme.com/products/sitemap.xml</loc>
<lastmod>2023-04-06T15:02:24.021Z</lastmod>
</sitemap>
</urlset>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
</urlset>
</sitemapindex>

@huozhi
Copy link
Member

huozhi commented Mar 11, 2024

Hi, we're evaluating a solution for sitemap-index internally, will share once we have it roughly finished. I'll keep this PR as draft atm. 🙏

@huozhi huozhi marked this pull request as draft March 11, 2024 14:58
@balazsorban44 balazsorban44 added Documentation Related to Next.js' official documentation. and removed area: documentation labels Apr 17, 2024
@solomkinmv
Copy link

Any updates on this?

@llegoelkelo
Copy link

this feature is a must and I am glad to see that the Next.js team is already looking into it. Any updates on the progress? Should we go ahead and implement something independently or are you guys almost done with the implementation? Please advise.

@tskorupka
Copy link

Almost year passed, any updates on this?

@Gumbraise
Copy link

Gumbraise commented Apr 24, 2025

Where is it please?? Vercel doesn't care about our SEO?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation. examples Issue was opened via the examples template. tests type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants