Sitemap.xml not generated correctly

Can anyone help me?
I noticed that it does not generate the sitemap.xml correctly. (

The “sitemap-posts.xml” file only shows 1 article out of 86.
The “sitemap-tags.xml” file does not show all the tags either.

I created the Sitemap for Google News as indicated in the official tutorial (Add your Ghost site to Google News) with the URL

I don’t know if it has something to do with it…
I’m using the latest version of Casper Theme & Ghost CMS.


EDIT 2: Now the /sitemap.xml only shows “sitemap-pagès.xml”…

You have numerous 404 errors across your site, which is likely the cause of the problem. Have you edited routes.yaml or changed the site structure in some way?

Hi @mjw ,

What 404 errors do you see on my site?

My routes.yaml:

    template: sitemap
    content_type: text/xml

    data: page.home
    template: page
    permalink: /{slug}/
    template: index

  tag: /tag/{slug}/
  author: /author/{slug}/


UPDATE: It is very strange. All my articles had been updated to “permalink” → “/p/xxxxxxxxxxxxxxxxxx”. I had to change it to “draft” and re-publish to get it to update the URL. Now the sitemap.xml works correctly too.

I don’t understand what changes you’ve made, but the 404 errors appear to be resolved now.