How do you handle sitemaps in payload cms

https://preview.redd.it/52gtdu56oqmf1.png?width=1412&format=png&auto=webp&s=627df4b3ec53b4cb787769e25122487e5bbd13e3

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.xml and /posts-sitemap.xml seem fine.
  • Only /pages-sitemap.xml fails 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
Loading comments…