On a Wix-managed headless project built with the Astro integration, Wix generates and serves /sitemap.xml for you, the same as it does on a Wix Editor or Wix Studio site. What differs is what feeds it.
This article explains what the generated sitemap covers, how it relates to your deployed routes, and which sitemap paths the platform reserves. For the SEO tags themselves, such as titles, meta descriptions, and canonical links, see About SEO Support.
/sitemap.xml is a sitemap index, not a flat list of URLs. It lists:
pages-sitemap.xml: Built from your page registry, served at /_wix/pages.json. This covers your main pages and any item-page routes you registered with wixMetadata.A URL that doesn't come from either source isn't in the generated sitemap. To add a URL anyway, such as a dynamic item URL the page registry doesn't cover, see Add URLs the generated sitemap doesn't cover below.
Important: pages-sitemap.xml reflects your deployed Astro routes, not pages built in an editor. A route appears there only if it exists in your published project. Removing a page from your navigation but leaving its .astro file in src/pages/ doesn't remove the URL from the sitemap, because the route is still live. To remove a URL, delete or redirect the route, then run wix release again.
Wix reserves /sitemap.xml and every *-sitemap.xml path on managed headless hosting. Don't define an Astro route at one of these paths. It collides with the platform's route the same way a custom robots.txt route does. See Reserved URL Paths for the Astro Integration.
If you need to serve a sitemap or feed the platform doesn't generate for you, use a path that doesn't end in -sitemap.xml, such as /sitemap-index.xml.
The generated sitemap covers your page registry and your installed business solutions. For dynamic item URLs it doesn't cover, fetch them yourself with List Sitemap Pages, filtered by itemType, and add them to a supplementary sitemap you serve at your own path. The method doesn't return static or main-page URLs, so use /_wix/pages.json for those instead.
/sitemap.xml returns a 404If the site's overall indexability is turned off in the dashboard, /sitemap.xml returns a 404. This is standard across all Wix sites, not something specific to headless.
pages-sitemap.xmlThe route isn't registered, or hasn't been published yet. Confirm it's listed in /_wix/pages.json, and that you've run wix build and wix release since adding it. For item-page routes specifically, see Add SEO Support to Item Pages.
Last updated: 15 September 2026