Analysis updated 2026-07-03
Automatically generate a sitemap.xml for a Next.js site after each build so search engines discover all static and server-rendered pages.
Split a large sitemap into multiple indexed files when a site has more URLs than a single sitemap file can hold.
Generate a robots.txt file alongside the sitemap by adding a single option to the next-sitemap config.
Exclude specific URL patterns from the sitemap or customize change frequency and priority per page using a transform function.
| iamvishnusankar/next-sitemap | shopify/hydrogen-v1 | fortawesome/react-fontawesome | |
|---|---|---|---|
| Stars | 3,732 | 3,731 | 3,736 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
next-sitemap is a tool for Next.js websites that automatically generates sitemap.xml and robots.txt files after you build your site. A sitemap is a file that tells search engines like Google which pages exist on your website and how often they change, which helps with search indexing. Without a sitemap, search engines have to discover your pages on their own, which can be slow or incomplete. Setup is straightforward: add a small configuration file to your project with your site's URL, then add a single line to your build scripts so that next-sitemap runs automatically after the Next.js build finishes. It picks up all the pages in your site, including static pages, pages pre-generated at build time, and dynamic pages that are built on the server when someone visits them. For larger websites, the tool can split the sitemap into multiple files automatically. Search engines have limits on how many URLs a single sitemap file should contain, so next-sitemap generates an index sitemap that points to all the individual files when the URL count gets large. You can configure the threshold yourself, for example splitting into new files every 7,000 URLs. Configuration options let you control how often pages are marked as changing (change frequency), the priority assigned to each page, which URLs to exclude, whether to generate a robots.txt file, and how to handle server-side rendered pages that fall outside the static build output. A custom transformation function is available if you need to modify which URLs appear in the sitemap or adjust their metadata per page. The library is written in TypeScript and distributed as an npm package. It integrates directly into the standard Next.js build workflow, so it runs automatically on each build with no extra steps beyond initial setup.
A tool for Next.js sites that automatically generates sitemap.xml and robots.txt files after each build so search engines can discover and index all your pages.
Mainly TypeScript. The stack also includes TypeScript, Node.js, Next.js.
No license information is provided in the explanation.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.