Check 24.15 · Multilingual indexing and sitemaps

Manage lastmod per translation

Give each translation its own lastmod date, which changes when its text changes and not when the original moves, on WordPress, Drupal, Laravel, Next.js or Astro.

Priority
Critical
Difficulty
Intermediate
Estimated time
1 to 4 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

In a multilingual sitemap, each translation is a separate URL: its <lastmod> date should be that of its last significant change, not that of the original page or of the file’s generation. When the French article is rewritten, only the French date changes; the German date only changes when the German version is actually updated. Once the task is done, the dates for each language tell the real story of each translation.

Why it matters

Google uses <lastmod> if the value is consistently and verifiably accurate, and specifies that it should reflect the last significant change: main text, structured data or links. Bing also asks for a date that follows real changes to the content. Both search engines compare what the sitemap says with what they find when crawling the page; when the dates lie, they stop trusting them for the whole site.

On a multilingual site, three mechanisms distort the dates:

  • The original’s date copied into every language. The generator reads the source content’s date and applies it to every translated URL: the Italian page shows an update on November 18 even though its text has not changed in a year. The crawler comes, finds nothing new, and learns that your dates are worthless.
  • Cascading updates. Saving the original re-saves every translation (field synchronization, automatic retranslation), and all the dates change at once.
  • No date per translation. Tools that translate at display time do not always store a date specific to each language.

The reverse is also a problem: a translation that has really been corrected but whose date does not move will be recrawled later. For a price, a procedure or a localized product page, that means days during which the Google or Bing index, and the generated answers that rely on them, keep the old version. No date, however, guarantees an immediate recrawl or a citation.

What it improves

  • Targeted recrawling Search engines come back to the translations that have really changed, language by language.
  • Credibility of the signal lastmod remains usable for the whole site, including in the main language.
  • Freshness in each market’s results and AI answers An indirect, unguaranteed effect.
  • Managing translations The gap between the original’s date and a translation’s date reveals translations that are lagging behind.
  • Rankings No direct effect.

How to check

1. Do the dates vary from one language to another? Compare the dates of the same group of pages in each sitemap:

for lang in fr de it; do
  echo "== $lang"
  curl -s --compressed "https://example.com/sitemaps/sitemap-$lang.xml" | grep -o '<lastmod>[^<]*' | cut -c10-19 | sort | uniq -c | sort -rn | head -n 3
done

Warning sign: the same distribution of dates in every language, or almost all of a language’s URLs on the same date.

2. The modification test. Change a page’s original without touching its translations, regenerate the sitemap, then compare: only the URL in the original language should change date. Then do the reverse by correcting a single translation.

3. Consistency with the page. For ten translations picked at random, compare the <lastmod>, the displayed “Updated on” date and dateModified in the translated page’s JSON-LD. All three should match.

How to implement

Before you start

What changes a translation’s date, and what does not:

Event Original’s lastmod Translation’s lastmod
Original’s main text rewritten Yes No, as long as the translation is not updated
Translation updated to follow the original No Yes
Language-specific correction (mistranslation, local term) No Yes, for that language only
Localized price, stock or legal notice Depending on the language Yes, for the language concerned
Translation’s structured data changed No Yes
Translated interface strings (menu, footer) No No
New language added to the group No Publication date for the new URL; see below for the others
Technical regeneration, migration, search and replace No No

Adding a language changes the hreflang annotations of every version. Google lists links among significant changes, but does not say whether hreflang annotations count. A cautious convention: do not change the date of existing versions, since the new URL signals its own publication through its own entry.

The data model. Each translation needs two pieces of information:

  • content_updated_at: the date of its last significant change, separate from the technical save date;
  • the version of the original it was produced from (date, revision number or hash of the source text), to know whether it is up to date.

The first feeds <lastmod>, the displayed date and dateModified. The second never goes into the sitemap: it is used to detect missing or outdated translations (opens in a new tab).

Format: W3C Datetime, for example 2026-11-18T14:05:00+01:00, with the time zone whenever a time is included. In an index, the <lastmod> of each language sitemap is the most recent date among the URLs it contains. The general rules are in provide a reliable lastmod (opens in a new tab).

Warning: machine translation rerun across the whole site changes the text of every translated page. If the result is genuinely different, the dates should move; if the tool rewrites identical text, they should not. Compare the text before and after rather than updating every date on principle.

WordPress

Versions WordPress 6.8 to 7.1; WPML 4.x, Polylang 3.x, TranslatePress, Weglot, Yoast SEO and Rank Math in their November 2026 versions.

  • WPML and Polylang: each translation is a separate post with its own modification date (post_modified_gmt), which the native sitemap, Yoast SEO and Rank Math use. The split is therefore correct by design. Two points to check: the fields WPML synchronizes from the original (the “Copy” setting for custom fields) and bulk operations, which can re-save translations and change their date. Run the modification test described above.
  • TranslatePress and Weglot: translations are stored separately, without a separate post. Translated URLs added to the sitemap usually take the original’s date, which does not move when only the translation changes. Check in the generated file; if this is the case, a translation correction will not be signaled by the sitemap, and a rewrite of the original will be signaled in every language even though the translations may not have changed.

For a bulk operation that leaves the dates untouched, go through WP-CLI or SQL while preserving post_modified, or do it language by language, knowing that the dates will be distorted once.

Shopify

Versions Shopify admin, all plans, with the Translate & Adapt app, November 2026.

Shopify generates the sitemaps and their dates, with no setting available. Check in the XML for each domain or language whether the dates change when you only edit a translation with Translate & Adapt. If they do not, there is nothing to fix on the sitemap side; signal important translation updates through the date displayed on the page instead.

Drupal

Versions Drupal 10.3 and 11, Simple XML Sitemap 4.x.

Drupal stores a modification date per translation: a content item’s changed field is translatable, and editing the German version does not change the date of the French version. Use the modification test to check that Simple XML Sitemap does take each translation’s date, and check that your modules synchronizing fields between translations do not re-save every language each time the original is edited.

Laravel

Versions Laravel 11 to 13, PHP 8.3 and later.

Update the translation’s content date only when a significant field of that translation changes:

<?php

// app/Observers/PostTranslationObserver.php
namespace App\Observers;

use App\Models\PostTranslation;

class PostTranslationObserver
{
    private const array SIGNIFICANT_FIELDS = ['title', 'body', 'faq', 'price', 'structured_data'];

    public function saving(PostTranslation $translation): void
    {
        if (! $translation->exists) {
            $translation->content_updated_at = now();

            return;
        }

        if (! $translation->isDirty(self::SIGNIFICANT_FIELDS)) {
            return;
        }

        $translation->content_updated_at = now();
    }
}
<?php

// app/Models/PostTranslation.php (excerpt)
use App\Observers\PostTranslationObserver;
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
use Illuminate\Database\Eloquent\Model;

#[ObservedBy([PostTranslationObserver::class])]
class PostTranslation extends Model
{
    protected function casts(): array
    {
        return ['content_updated_at' => 'datetime'];
    }
}

The sitemap generator reads each translation’s content_updated_at (see automate sitemaps (opens in a new tab)), never the original’s updated_at. Do not propagate the original’s save to the translations with a touch() on the relationship.

Next.js

Versions Next.js 15 and 16 (App Router).

In app/sitemap.ts, take the date of each language entry returned by the CMS. Most headless CMSs manage one entry or version per language, with its own update date; check this in your CMS’s API before relying on it.

return page.translations.map((translation) => ({
  url: `${BASE_URL}${translation.path}`,
  lastModified: translation.contentUpdatedAt,
  alternates: { languages },
}))

Use neither new Date() nor the date of the original page. If the CMS does not provide a date per language, omit lastModified for these URLs rather than making one up.

Nuxt

Versions Nuxt 3.x and 4, @nuxtjs/sitemap 7 to 9 (version 9 requires Nuxt 4.6 or later) with @nuxtjs/i18n 9 and 10.

With @nuxtjs/sitemap, set lastmod on each entry returned by your source, based on the translation’s date. If you use _i18nTransform: true, a single entry is generated in every language with the same date: reserve this option for content whose translations are all updated together, and otherwise return one entry per translation with _sitemap and its own date.

Astro

Versions Astro 5 to 7, @astrojs/sitemap 3.

The lastmod option of @astrojs/sitemap applies to the whole site. For a date per translation, use serialize() with a lookup table built at build time from your collections:

// astro.config.mjs
import { defineConfig } from 'astro/config'
import sitemap from '@astrojs/sitemap'
import dates from './src/data/translation-dates.json' with { type: 'json' }

export default defineConfig({
  site: 'https://example.com',
  integrations: [
    sitemap({
      serialize(item) {
        const date = dates[item.url]

        if (date) {
          item.lastmod = date
        }

        return item
      },
    }),
  ],
})

The translation-dates.json file maps each full URL to the date of its translation, for example from an updatedDate field in the front matter of each language file. Avoid the date of the folder’s last Git commit, which changes for non-significant edits.

Common mistakes

  • Copying the original’s date onto every translation: the secondary languages announce updates that never happened.
  • Propagating the original’s save to the translations (synchronization, touch(), identical machine retranslation).
  • Changing nothing when a translation is corrected, because the sitemap reads the original’s date.
  • Using the file’s generation time for every URL in a language.
  • Dating the index with the generation time instead of the most recent date of each language sitemap.
  • Inconsistent dates between <lastmod>, the displayed date and the translated page’s dateModified.

Frequently asked questions

Should the translations’ lastmod be updated when the original changes?

No, not as long as the translations themselves have not changed. A URL’s lastmod date should reflect the last significant change to that specific page. If the French article is rewritten and the German version stays the same, only the French URL changes date. The German version will get a new date on the day its translation is updated.

Does a machine translation count as a change?

Yes, if the published text really changes. A new machine translation that alters the page’s main content is a significant change, and its date should change. On the other hand, rerunning the tool across the whole site without the text changing should not alter the dates. Compare the text before and after rather than dating every page on principle.

What if my translation tool does not provide a date per language?

If the tool does not provide a date per language, you have two honest options. Omit lastmod for the translated URLs, which Google accepts, or keep the original’s date, knowing that it does not reflect translation corrections. Do not make up a date, such as the sitemap generation time: a false signal pushes search engines to ignore lastmod for the whole site.

Should adding a new language change the lastmod of the other versions?

Google does not say. Adding a language changes the hreflang annotations of every version, but the main content of the existing pages does not change. A cautious convention is to leave the dates of existing versions alone: the new translation appears in the sitemap with its own publication date, which is enough for it to be discovered.

Updated on

Topic checklist (PDF)

And now?

In the “Multilingual indexing and sitemaps” topic

  1. Use a self-referencing canonical for each actual translation
  2. Do not canonicalize all translations to the main language
  3. Check that each language is indexed independently
  4. Identify duplicates within a language
  5. Handle near-identical regional variants
  6. Check noindex by language
  7. Check untranslated URLs and fallbacks
  8. Check localized 404 errors
  9. Check redirects and old translated URLs
  10. Compare Google-selected canonicals
  11. Create per-language sitemaps if useful
  12. Create a sitemap index
  13. Automate sitemaps
  14. Exclude unpublished or non-indexable translations
  15. Manage lastmod per translation
  16. Submit sitemaps to Google/Bing
  17. Track the indexing rate by language