Several blog posts not getting updated in sitemaps.xml posts

We are hosting blogs at https://blog.getidyll.in
However if you check sitemap.xml file it is not indexing new blogs. Any workaround to it? Previously all admin posts were being indexed but new author content isnt.

The first step I’d try is restarting Ghost. However, we’ll need additional info to help troubleshoot:

  • How are you hosting Ghost?
  • What version of Ghost are you using?
  • What configuration?
  • Any other customizations you’ve made?

Thanks

1 Like

The most recent post I see is from today. So, it seems like it’s working to me?

❯ https GET  https://blog.getidyll.in/sitemap-posts.xml
HTTP/1.1 200 OK
Cache-Control: public, max-age=3600
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
Date: Tue, 08 Aug 2023 13:34:13 GMT
ETag: W/"ca7-V2Hn1m+pcQjeSSMn2DCyxyiNY/o"
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Powered-By: Express

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="//blog.getidyll.in/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>https://blog.getidyll.in/safety-well-being-on-idyll/</loc>
    <lastmod>2023-08-08T07:30:40.000Z</lastmod>
    <image:image>
      <image:loc>https://blog.getidyll.in/content/images/2023/08/WhatsApp-Image-2023-08-08-at-12.59.56--1-.jpeg</image:loc>
      <image:caption>WhatsApp-Image-2023-08-08-at-12.59.56--1-.jpeg</image:caption>
    </image:image>
  </url>
  <url>
1 Like

Hey we are self hosting ghost in our VPS server using docker.

Ghost Versions inside the container -
Ghost-CLI version: 1.24.2
Ghost version: 5.55.2 (at /var/lib/ghost)

I created a config.production.json and mounted it as a volume to the containers directory. Here is the contents-
{
“url”: “https://blog.getidyll.in”,
“server”: {
“port”: 2368,
“host”: “::”
},
“mail”: {
“transport”: “SMTP”,
“options”: {
“service”: “Mailgun”,
“auth”: {
“user”: “",
“pass”: "

}
}
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“process”: “systemd”,
“paths”: {
“contentPath”: “/var/lib/ghost/content”
},
“sitemap” : {
“enabled” : true
}
}

We have two authors - Kushal (Admin) and Sakshi (Editor)
I haven’t made any other customizations.
@markstos for example this post isnt being reflected - How To Date When Life Keeps You Busy?

Can you post your routes.yaml too please?

This does appear to be a bug in Ghost. sitemap-posts.xml only includes about 9 pages, and your example is more recent than some of them.

It’s my understanding that the sitemap-posts.xml could contain 50 or more entries.

It’s not clear why Ghost might not displaying the page in there.

@Kevin ?

I suspect there’s some weirdness with routing, maybe related to having author or tag in the url? I’ve seen it before, but never got it nailed down… I’d like to see the routess.yaml…

1 Like

@Idyll_Dating can you check to see if the posts that aren’t showing up have had a canonical URL set on them? Looking at your example post it’s missing the trailing slash on the canonical URL, if it was the automatic one Ghost sets it would have a trailing slash which is why I’m thinking that’s likely the problem.

Setting a manual canonical URL is an advanced use-case and should only be done for posts where the original lives on a different url or site which is why they won’t get added to the sitemap. In the vast majority of cases the field should be left blank.

2 Likes

OOoh, good catch. That’d make perfect sense, because posts with a canonical url set don’t show up in the sitemap (because they live elsewhere), right?

Hey @Cathy_Sarisky Heres the auto generated routes.yaml

routes:

collections:
/:
permalink: /{slug}/
template: index

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

@Kevin Letme check it once rn

1 Like

Hey @Kevin you are correct. My team was somehow setting canonical url. I wasnt able to debug it. Thanks for letting us know. Claps

2 Likes