What express-sitemap-xml does
It is a Node.js package for Express applications. You give it a function that returns the URLs you want indexed, and it registers a route that answers requests for sitemap.xml with sitemap XML. The XML is produced by the middleware itself, so no file has to be written to disk or rebuilt by a separate build step.
Large sites are handled by splitting. When the URL list goes past the per file limit set by the sitemap specification, the package generates several sitemap files and serves a sitemap index at the main path instead. The module also works outside Express, calling its functions directly to build the sitemap XML for another framework.
Key features
- Sitemap served as middleware
- Registers an Express middleware that answers requests for the sitemap path with XML built from your URL list.
- Automatic sitemap index splitting
- When the URL list exceeds the per file limit in the sitemap specification, several sitemap files are generated and a sitemap index is served.
- Sitemap spec compliance
- Output follows the sitemaps.org protocol and the requirements search engines such as Google place on sitemap files.
- Usable without Express
- The package can also be used without the Express framework, calling its functions directly to build sitemap XML.
- Installed from npm
- Added to a project with the npm install command under the package name express-sitemap-xml.
- MIT licensed source
- Released under the MIT license, copyright Feross Aboukhadijeh, with source in JavaScript following the standard code style.
How it works
- Install the package into an Express project with the npm install command.
- Write a function that returns the list of URLs you want in the sitemap.
- Register the middleware on the app so it answers requests for the sitemap path.
- The middleware builds the sitemap XML from that URL list when the route is requested.
- If the list is larger than one sitemap may hold, it splits the output and serves a sitemap index.
Plans and pricing
The package is published under the MIT license at no cost, with no paid tiers listed.
Integrations and platforms
Works with
- Express
- Node.js
- npm
Available as
- Web
Repository facts
- Repositoryfeross/express-sitemap-xml
- LanguageJavaScript
- Stars69
- Forks11
- LicenceMIT
- Created2018-07-15
- Last commit2026-06-22
- Open issues1
- express
- javascript
- middleware
- nodejs
- sitemap
- sitemap-generator
- sitemap-xml
Services and details
Does SEO work itself
YesFree plan or free tools
YesAPI or MCP server
Yes
No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free trial, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.
About the company
- Company feross
- Website: github.com/feross/express-sitemap-xml
Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.