Sitemap not rendered as local build

Hello !
I have problem on the generated sitemap for “https://pencoapp.netlify.app/
The sitemap seems to be well configured on local build.
I use Gatsby plugin sitemap. here is an example of the good result built on local:

<url>
    <loc>https://penco.app/fr/resources/blog/page1/</loc>
    <lastmod>2024-10-09T08:11:04.625Z</lastmod>
    <priority>0.7</priority>
    <xhtml:link rel="alternate" hreflang="en" href="https://penco.app/en/resources/blog/page1/"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://penco.app/resources/blog/page1/"/>
  </url>

  <url>
    <loc>https://penco.app/en/resources/blog/page1/</loc>
    <lastmod>2024-10-09T08:11:04.625Z</lastmod>
    <priority>0.7</priority>
    <xhtml:link rel="alternate" hreflang="fr" href="https://penco.app/fr/resources/blog/page1/"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://penco.app/resources/blog/page1/"/>
  </url>

  <url>
    <loc>https://penco.app/resources/blog/page1/</loc>
    <lastmod>2024-10-09T08:11:04.625Z</lastmod>
    <priority>0.7</priority>
    <xhtml:link rel="alternate" hreflang="fr" href="https://penco.app/fr/resources/blog/page1/"/>
    <xhtml:link rel="alternate" hreflang="en" href="https://penco.app/en/resources/blog/page1/"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://penco.app/resources/blog/page1/"/>
  </url>

but after deployed on netlify, here is the sitemap file produced:

> https://penco.app/fr/resources/blog/page1/
> 2024-10-09T08:11:04.625Z
> 0.7
> https://penco.app/en/resources/blog/page1/
> 2024-10-09T08:11:04.625Z
> 0.7
> https://penco.app/resources/blog/page1/
> 2024-10-09T08:11:04.625Z
> 0.7

Any advice to resolve this error? see you guys!

@loikite This is the file I see on your site:

https://pencoapp.netlify.app/sitemap/sitemap-index.xml
https://pencoapp.netlify.app/sitemap/sitemap-0.xml

I’ve only done a quick visual comparison, but it looks the same to me.

ooOoh thanks Nathan, so it’s just a problem of displaying the xml sitemap on my chrome browser!! I don’t find how to get the same view as yours. I have this.


Now, I’ll work on lastmod thing :wink:

@loikite I’m also using Chrome and see the same as you rendered in the browser.

For the sitemap-index.xml I see:

For the sitemap-0.xml I see:

In the screenshot in my previous post you’ll see I used ‘view source’ to view the text of the file.

The sitemap-0.xml file doesn’t consist of the same structure, it’s a urlset.

I figured it out for mdx blog posts too. I have the right lastmod ;)Thank you for your help.

thank you for sharing your solution! This is definitely helpful for other users :wave:t6: