Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Sitemap lastmod missing or identical on every URL: how to fix it

SEO-109Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An XML sitemap is a file that lists the URLs you want search engines to crawl. Each entry can include a <lastmod> tag: the date the page was last meaningfully changed. Two things go wrong. Either the tag is missing on every URL, or it is present but identical everywhere, usually because the generator stamps each URL with the date or time the sitemap was built.

Correct vs problem entrieshtml
<!-- Good: real date per URL -->
<url>
  <loc>https://example.com/pricing/</loc>
  <lastmod>2025-03-14</lastmod>
</url>
<url>
  <loc>https://example.com/blog/how-to-choose/</loc>
  <lastmod>2025-05-02T09:30:00+00:00</lastmod>
</url>

<!-- Problem: same value on every URL -->
<url>
  <loc>https://example.com/pricing/</loc>
  <lastmod>2025-06-20T04:00:00+00:00</lastmod>
</url>
<url>
  <loc>https://example.com/blog/how-to-choose/</loc>
  <lastmod>2025-06-20T04:00:00+00:00</lastmod>
</url>

Why it costs you leads or sales

The impact is low and indirect. Crawlers have limited time for your site. A trustworthy lastmod helps them spot which pages changed, so updated pricing, offers or landing pages get recrawled sooner. If the date is the same everywhere, crawlers cannot tell what is new, and they may fall back on their own guesses.

How a bad lastmod slows updates reaching search
  1. You edit a pageNew price or offer goes live
  2. Sitemap lastmodMissing or same date on every URL
  3. Crawler prioritisesCannot tell what changed
  4. Search shows updateSlower to appear

A changed page is only recrawled quickly if the sitemap signal can be trusted.

How to check if your site has it

Check your sitemap's lastmod values
  1. Open your sitemap

    Visit /sitemap.xml, /sitemap_index.xml (Yoast, Rank Math) or /wp-sitemap.xml (WordPress core). If it is an index, open one child sitemap.

  2. View the source

    Right-click and choose View page source, or use curl, so you see the raw XML.

  3. Look for lastmod on each URL

    Check that every <url> has a <lastmod>.

  4. Compare the dates

    If all dates match to the minute, or equal today's date, they are probably generated at build time.

  5. Spot-check against reality

    Pick three pages you know you edited long ago. Their lastmod should be old, not recent.

Count distinct lastmod valuesbash
curl -s https://example.com/sitemap.xml | grep -o '<lastmod>[^<]*' | sort | uniq -c | sort -rn | head

If one value accounts for nearly every line, you have the problem. If there are no lines at all, lastmod is missing. You can also crawl your sitemap with a tool such as Screaming Frog, which lists the lastmod column, or look at the Sitemaps report in Google Search Console for read errors.

How to fix it

The goal is simple: each URL's lastmod equals the last time its main content really changed. Not the build time, not the time a footer or sidebar changed, and not the current date on every request.

Fix lastmod by platform
  1. Use the built-in or SEO plugin sitemap

    WordPress core (5.5+) sitemaps at /wp-sitemap.xml include lastmod for posts and pages from the modified date. Yoast SEO and Rank Math also output lastmod from the post modified date.

  2. Find what bumps the modified date

    Bulk edits, plugins that touch every post, or a scheduled job that re-saves content can reset the modified date on all pages. Disable or limit them.

  3. Avoid two sitemaps

    Make sure only one plugin generates the sitemap, so you are not checking the wrong file.

Example: outputting the real modified date (custom PHP)php
<?php
// $pages comes from your database, with 'url' and 'updated_at' columns
header('Content-Type: application/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
foreach ($pages as $p) {
  $date = date('c', strtotime($p['updated_at']));
  echo '<url><loc>' . htmlspecialchars($p['url']) . '</loc>';
  echo '<lastmod>' . $date . '</lastmod></url>';
}
echo '</urlset>';

How to confirm it's fixed

Confirmation checklist
  • Re-run the curl command: you see many different lastmod values, not one.
  • Every URL in the sitemap has a lastmod.
  • Dates match the real last edit on three spot-checked pages.
  • Dates are in valid format (YYYY-MM-DD or full timestamp with timezone).
  • Editing one page changes only that page's lastmod.
  • Search Console shows the sitemap as Success with no errors.
Sitemap lastmod before and after

Before

  • Every URL shows the build date
  • Old pages look freshly updated
  • Crawlers learn to ignore the tag

After

  • Each URL shows its real last change
  • Only edited pages move
  • The signal stays trustworthy

How to prevent it happening again

Prevention checklist
  • Choose one sitemap generator and disable the others.
  • After plugin, theme or migration changes, re-run the distinct lastmod count.
  • Be careful with bulk edits and re-saves; they can reset modified dates.
  • Add a sitemap check to your release checklist.
  • Review the sitemap after any CMS upgrade or move to a new platform.

How FunnelGuard handles this

FunnelGuard does not check sitemap lastmod values today. It is a possible future check. FunnelGuard is a synthetic monitoring service: a robot visitor runs your real customer journeys, such as lead forms, checkouts and booking buttons, and checks each step, the tracking hits sent to ad and analytics platforms, and whether test leads arrive. That covers what happens after a visitor lands, not how your sitemap is built.

Questions people ask

Why is my sitemap lastmod the same on every URL?

Your generator is probably stamping each URL with the time the sitemap was built, or a plugin or import job has re-saved every page and reset the modified date. Check how your CMS or plugin sets lastmod and look for bulk updates.

Is lastmod required in an XML sitemap?

No. Only <loc> is required for each URL. But an accurate lastmod helps search engines decide which pages to recrawl, so it is worth including when you can keep it correct.

Does Google use sitemap lastmod?

Google has said it uses lastmod when it is consistently and verifiably accurate. It ignores <changefreq> and <priority>. If your dates are wrong or identical, Google may disregard the field.

What format should lastmod use?

Use W3C datetime: either a date like 2025-05-02, or a full timestamp such as 2025-05-02T09:30:00+00:00. Include the timezone when you give a time.

Can wrong lastmod values hurt my rankings?

There is no known penalty, but inaccurate dates make the signal useless, so updated pages may be recrawled more slowly. The impact is usually small and indirect.

How do I fix lastmod in WordPress?

Use one sitemap source (core, Yoast or Rank Math), which outputs the post modified date. Then stop plugins or bulk edits from re-saving every post, because that resets the dates.

Should I update lastmod every time I change a page?

Only for meaningful changes to the main content, structured data or links. Small tweaks like a copyright year or a sidebar widget should not change it.

Does FunnelGuard check my sitemap lastmod?

No, not yet. It is a possible future check. For now, use curl, a crawler such as Screaming Frog or Search Console to review it.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.