How do you handle sitemaps in payload cms
I’m using a Payload CMS website template that comes with sitemap integration by default. At the root, I have /sitemap.xml which references /pages-sitemap.xml and /posts-sitemap.xml.
The issue is with pages-sitemap.xml. It fetches all the pages on my site, maps through them, and then returns the sitemap but this process is expensive and slow. When I submitted the sitemap to Google Search Console, it was unable to fetch pages-sitemap.xml.
For context:
- I only have 9 total pages (including subpages).
/sitemap.xmland/posts-sitemap.xmlseem fine.- Only
/pages-sitemap.xmlfails in GSC.
Has anyone faced this with Payload before? Any ideas on how to optimize/fix this so Google can read it?
Posted Sep 2, 2025, 11:56 AM UTC
33