SEO/GEO
02 Jun 2026

The last-modified tag: the complete technical SEO guide

Valentin Lefèvre
-
SEO Consultant
/
Reading time
6 min
Reading time
Contents
Follow us

In short: The last-modified tag is a technical signal that tells Google the date a web page was last modified. It comes in two complementary forms: the sitemap XML's <lastmod> tag and the Last-Modified HTTP header returned by the server. Used well, it directs the crawl budget toward pages that have genuinely been updated and reduces server load through 304 Not Modified responses. Managed poorly, it can lead Google to ignore the signal entirely across the whole site. In our SEO audits, errors on the lastmod tag rank among the most common technical SEO problems.

What is the last-modified tag and why is it strategic?

The last-modified tag is a technical signal that tells search engines the date a web page was last modified. In practice, it lets Googlebot know whether a URL's content has changed since its last visit, so it can decide whether or not to re-crawl it. For a website with thousands of pages, this signal becomes a central lever for steering the crawl budget.

It is essential to understand from the outset that the last-modified tag actually covers two distinct but complementary mechanisms:

  • The <lastmod> tag, embedded in each URL of the site's sitemap XML file.
  • The Last-Modified HTTP header, returned by the server in the response to each request for a page.

Ideally, the two signals should be consistent with each other. A page whose lastmod tag indicates a recent modification in the sitemap, but whose HTTP header returns an old date, sends a contradictory signal to Google. This inconsistency is one of the most frequent errors we detect during our technical SEO audits.

The role in the crawl and indexing process

Google uses the last-modified date to prioritize crawling the URLs that have genuinely changed. On a large site, this prioritization is decisive: since the crawl budget is limited, each Googlebot visit should be allocated first to updated pages rather than to pages that have been unchanged for months.

The sitemap XML's <lastmod> tag must follow the ISO 8601 format, while the Last-Modified HTTP header follows the RFC 1123 format. These formats are mandated by the official specifications, and any deviation causes the signal to be ignored by search engines.

Lastmod vs Last-Modified: two tags, two distinct uses

Confusing the sitemap XML's <lastmod> tag with the Last-Modified HTTP header is a classic mistake, even among experienced technical teams. The two signals serve different but complementary functions in the SEO ecosystem.

Criterion <lastmod> tag (sitemap) Last-Modified header (HTTP)
Location Sitemap XML file at the root of the site HTTP response header returned by the server
Recipient Search engines only Browsers + search engines
Primary use Prioritize crawling of updated pages Manage cache, respond to conditional requests
Format ISO 8601 (e.g.: 2026-04-21T10:30:00+01:00) RFC 1123 (e.g.: Wed, 21 Apr 2026 10:30:00 GMT)
Direct SEO impact Crawl budget steering Server performance, indirect Core Web Vitals
Read by Google Yes, official crawl signal Yes, via If-Modified-Since requests

The <lastmod> tag is therefore the priority element from a pure technical SEO standpoint. It is the one processed directly by Google through the sitemap XML file submitted in the Search Console. The Last-Modified HTTP header plays a more technical role, but its impact on server performance and on reducing crawl load remains significant on high-traffic websites.

Why does Google use the lastmod tag as a crawl signal?

Google has publicly confirmed on several occasions, notably through its spokespeople John Mueller and Gary Illyes, that the <lastmod> tag is indeed used in its crawl process. Its consideration, however, remains conditional on the signal's reliability over time.

"We use the lastmod tag in sitemaps as a signal to decide when to re-crawl a page. But if we find that a site systematically lies about its modification dates, we simply stop using that field for that site."

  • Gary Illyes, Google Search Central, 2023

In practice, this means that a website that updates the lastmod tag date without any real change to the content risks having its signal ignored across the entire domain. This is a critical point: forcing the current date onto every URL with each regeneration of the sitemap is counterproductive and can lastingly degrade the quality of your sitemap XML file as perceived by Google.

The conditions for Google to take your lastmod into account

For the lastmod tag to actually be used by Google, several conditions must be met:

  • The date must reflect a significant modification of the content (main text, structured data, important internal links), not a simple technical cache regeneration.
  • The format must comply with strict ISO 8601, with or without a time zone depending on the precision needed.
  • The date must be consistent with the Last-Modified HTTP header returned for the same URL.
  • The sitemap XML file must be submitted and validated in the Google Search Console for Google to process its content.

The impact on the crawl budget

The crawl budget refers to the volume of pages that Googlebot agrees to crawl on a site within a given timeframe. This budget is limited by the domain's authority, loading speed and the overall quality of the content. A reliable lastmod tag allows Google to focus this budget on the URLs that have genuinely been modified rather than on redundant crawling of the site's unchanged pages.

How to implement the lastmod tag correctly?

Most modern CMS platforms and SEO plugins automatically generate the <lastmod> tag in the sitemap XML file. But the quality of the signal depends entirely on how the date is calculated upstream.

The expected structure in the sitemap XML

Each URL of the sitemap XML file must contain a <lastmod> tag in ISO 8601 format. Here is the minimal structure expected by Google:

Two ISO 8601 formats are accepted by the sitemaps.org specifications:

  • Simple date: 2026-04-21 (sufficient for a site with a low update frequency)
  • Date and time with time zone: 2026-04-21T10:30:00+01:00 (recommended for e-commerce sites, media outlets and high-volume sites)

The methods depending on your CMS

  • WordPress (Yoast SEO, Rank Math): the lastmod tag is managed automatically based on the post's last modification date in the database. You need to check in the plugin settings that irrelevant entries (authors, tags, post formats) are properly excluded from the sitemap XML file
  • Shopify, PrestaShop, Magento: the native sitemaps XML include the lastmod tag, but the date calculation logic varies. You need to audit its behavior (real product modification vs simple stock update).
  • Custom-built sites: the date calculation must be implemented server-side, based on the modification date recorded in the database for each URL. A full regeneration of the sitemap must be triggered with each publication or significant editorial change.

The sitemap validation

Before submitting to the Google Search Console, validate the structure of the sitemap XML file with an ISO 8601 validator (e.g.: xmllint) or directly through the Google Search Console's testing feature. A lastmod tag in the wrong format silently invalidates the signal without any explicit error message.