Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-10-13 08:29:46

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

search console and sitemap error

my sitemap

<txp:header name="Content-Type" value="application/xml; charset=utf-8" />
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc><txp:site_url /></loc></url>
<txp:section_list exclude="sitemap,muu,various,test,otsing,saada-paring,saadetud" break="">
<url><loc><txp:site_url /><txp:section />/</loc></url>
</txp:section_list>
<txp:article_custom section="massoor" break="url" wraptag="" limit="9999">
<loc><txp:permlink /></loc>
<lastmod><txp:modified format="w3c" /></lastmod>
</txp:article_custom>
</urlset>

SC: “An invalid date was found. Please fix the date or formatting before resubmitting
Line 9
Parent tag:url
Tag: lastmod
Line 13
Parent tag:url
Tag:lastmod”

what i need to change?

Offline

#2 2024-10-13 10:18:24

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,734
Website

Re: search console and sitemap error

The first thing to check is those lines of your sitemap to see if anything is obviously wrong.

Otherwise, the search console can be very fussy, especially with the time zone information.

If your site doesn’t update several times during the day ( e.g. like a news site or forum), you probably don’t need down to the minute lastmod information and could simply do:

<lastmod><txp:modified format="%Y-%m-%d" /></lastmod>

That gives you:

<lastmod>2024-10-13</lastmod>

which is accepted more easily…


TXP Builders – finely-crafted code, design and txp

Offline

#3 2024-10-16 09:04:42

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: search console and sitemap error

jakob wrote #338013:

The first thing to check is those lines of your sitemap to see if anything is obviously wrong.

Otherwise, the search console can be very fussy, especially with the time zone information.

If your site doesn’t update several times during the day ( e.g. like a news site or forum), you probably don’t need down to the minute lastmod information and could simply do:

<lastmod><txp:modified format="%Y-%m-%d" /></lastmod>...

That gives you:

<lastmod>2024-10-13</lastmod>...

which is accepted more easily…

bingo!

Offline

Board footer

Powered by FluxBB