Why is this date in my sitemap "invalid" according to Google

by Stephen Ostermiller   Last Updated January 12, 2018 08:04 AM

My XML sitemap file has <lastmod>2013-07-06T09:39:51-0400</lastmod> formatted with W3C Datetime Format. Google has a warning message in webmaster tools about this for me:

enter image description here

Google's help document about error sitemap errors states:

This could be because a date is in the incorrect format, or the date itself is not valid. Dates must use W3C Datetime encoding, although you can omit the time portion if you wish. For example:

  • 2005-02-21
  • 2005-02-21T18:00:15+00:00


Answers 2


2013-07-06T09:39:51-0400

The W3C datetime format includes a : (colon) in the time zone offset, separating the hours and minutes. So the last bit should read: -04:00.

MrWhite
MrWhite
July 06, 2013 16:43 PM

just make sure there will be no space in between a single space will give invalid date or something error like that. for example

  • 2005-02-21T18:00:15 +00:00 -- space in between
  • 2005-02-21T18:00:15+00:00 -- no spaces here valid markup
Amrish sharma
Amrish sharma
January 12, 2018 08:00 AM

Related Questions


Images sitemap not indexed

Updated March 22, 2017 14:04 PM


Images are not indexed in google search console

Updated June 29, 2017 11:04 AM


Crawling only the sitemap on google webmaster tools

Updated January 26, 2018 17:04 PM