Sitemap "Invalid date" error: how to fix lastmod dates
Invalid date means a <lastmod> date in your sitemap is in the wrong format, or is not a real date. Use 2026-10-08, or a full time with a time zone.
By Bruno Amorim · ·
Where you see it
On a sitemap's details page in Indexing > Sitemaps, under Sitemap can be read, but has errors.
What it means
Dates in a sitemap must use the W3C Datetime format. You can leave out the time. If you include a time, you must include a time zone.
Google uses <lastmod> only when it is consistently and verifiably accurate. A wrong date costs you that signal.
Common causes
- A time without a time zone, such as
2026-10-08T18:00:15. - A local format, such as
10/08/2026or08.10.2026. - A date that does not exist, such as month 13, or an empty
<lastmod>tag.
Find the cause
- Expand the error in Search Console to see the line.
- Open the sitemap and look at the
<lastmod>values near that line.
How to fix it
- Write dates as
YYYY-MM-DD, such as2026-10-08. - Or write a full time with a time zone, such as
2026-10-08T18:00:15+00:00. - Set
<lastmod>to the last time the page's main content changed, not the time the sitemap was built. - Resubmit the sitemap.
See which of your pages Google skipped, and why. Free for up to 500 pages.
Get my free reportOn your platform
WordPress
If a plugin builds your sitemap, update it first. If the error stays, find which tool builds the sitemap: WordPress itself (/wp-sitemap.xml), an SEO plugin (/sitemap_index.xml), or another plugin. Report the bad dates to that tool, or switch to another one. WordPress pages not indexed
Catch sitemap problems before they cost you pages
On paid plans, CrawlCoach downloads your sitemaps every day and reads Search Console's sitemap data for each fix list. When a sitemap stops loading, Search Console reports errors in it, or Google stops reading it, the fix goes in your fix list with the steps and a link to the right guide. See plans and prices.
Questions
What date format does a sitemap need?
W3C Datetime. For example 2005-02-21, or 2005-02-21T18:00:15+00:00. The time is optional, but a time needs a time zone.
Should lastmod change every time the sitemap is built?
No. It should show the last significant change to the page, such as its main text, structured data, or links. Google uses <lastmod> only when it is consistently accurate.
Sources
Checked on October 8, 2026. Search Console's wording can change after that date.
See which of your pages Google skipped
Sign in with Google. CrawlCoach checks up to 500 pages for free and shows the fix for each problem.
Get my free reportFree for up to 500 pages. No card needed. Sign in with the Google account you use for Search Console.
Related sitemap errors
- XML and format errorsThese errors mean the sitemap file is not valid XML, or not in the sitemap format Google expects. Most come from a plugin or theme printing extra text, or from an unescaped &.
- Has errorsHas errors means Google downloaded your sitemap but found problems in it. Google still uses the addresses it could read. Click the sitemap to see each error, then fix them in the file.