next-sitemap
Generate XML sitemaps and robots.txt for a Next.js site.
Community support
Upvotes come from SearchEngineAnswer members. GitHub stars and reader reviews are counted separately.
Claim this tool if you maintain it.
- Best for
- Publishing
- Setup required
- Next.js build output and a configuration with the production site URL.
- Costs to check
- Budget for maintaining route filters and checking the generated files after deployment.
- License in catalog
- MIT
Project screenshot
GitHub repository
- GitHub stars
- 3,750
- Forks
- 138
- Last push
- 2026-05-13
- Primary language
- TypeScript
GitHub snapshot from . Stars count GitHub bookmarks. Reader ratings appear separately below.
How to install next-sitemap
-
Install next-sitemap in your Next.js project.
npm install next-sitemap - Create the configuration described in the README with the production site URL. Add exclusions for routes outside your public canonical inventory.
First tutorial for next-sitemap
- Run sitemap generation after a staging build and inspect the generated sitemap index and child sitemap.
- Confirm the canonical test page appears once and that private or redirected test paths are excluded.
Where next-sitemap fits
Use next-sitemap when you want to generate and split sitemaps from a Next.js project and need control over exclusions or additional sitemap files.
- When to choose another tool
- Start with the framework’s built-in sitemap route if your App Router project has a small inventory you can describe directly.
- First evaluation
- Build a staging fixture with one public page, one redirect, and one private path. Apply your exclusions, open the generated index and sitemap, and confirm the intended page is listed once with the production hostname.
- How to interpret the result
- Check the final deployed URLs as well as the XML. An included URL can still redirect, carry a different canonical, or be excluded from indexing.
Reviews and discussion
Reader reviews
Be the first to share your experience with this tool.
Discussion
Ask a question or share a setup tip.
Flag an outdated detail
Include the field that needs updating and a source link. Copy your draft, then use the corrections policy to contact the editorial team.
Write a review or join the discussion