Missing sitemap-posts.xml

Hi everyone.

Just creating this post to share my issue and how i fixed it. We had an issue on our self-hosted ghost instance that left the sitemap-posts.xml file missing in the myblog.com/sitemap.xml file. We were running the latest versions of ghost (so at this post date it was 5.59.2). After checking our config.production.json file and routes.yaml files we could not find why the sitemap was missing and our google skills were getting us no results, so we decided to pray and hope it could be fixed by rolling back version. We found out that the sitemap-posts.xml file was present again in version 5.20.0 so we will stick with this one.

Hope this will help some people having the same issue as we did.

Do the missing posts have a canonical URL?

2 Likes

I looked around and it indeed does have canonical URL "<link rel="canonical" href="https://mywebsite.com/blog/post" /> ".

There’s your problem. Canonical urls tell ghost to omit your page from the sitemap, because the Google crawler is going to ignore it!

1 Like

Thanks for the info! it seems a bit backward since we did not change anything to enable them while installing and configuring our ghost instance. I’ll look around and check how we can disable them

Ghost doesn’t set them in the post editor by default. Is there an import or something in your past?