Sitemap.xml Best Practices

Sitemap.xml Best Practices
  • Oct 14, 2025 modified: Oct, 14 2025

Sitemap.xml Best Practices

How to Use ‹lastmod› Correctly for Better Google Crawling

If you manage a website, you've probably heard about the importance of SEO and helping Google find your content.

One of the easiest ways to do that is through a sitemap.xml file. This is a behind-the-scenes tool that gives search engines a clear guide to all the important pages on your site.

But just having a sitemap isn't enough. How you structure and maintain it matters, especially when it comes to signaling which pages are fresh or recently updated. That's where the ‹lastmod› tag comes in. Used correctly, it can improve how often Google revisits your pages and keeps your content visible in search results.

Understanding Sitemap.xml and the ‹lastmod› Tag

A sitemap.xml file is exactly what it sounds like: a map of your website in XML format.

It's created specifically for search engines like Google and Bing. While crawlers can usually discover pages by following links, a sitemap helps speed things up and ensures no important pages get missed, especially if they're newly published or hard to reach through internal links.

Each sitemap contains a list of URLs you want search engines to crawl and index. It can also include optional metadata about each page, such as:

  • When it was last updated (‹lastmod›)
  • How frequently it changes (‹changefreq›)
  • Its relative importance on the site (‹priority›)

Among these, the ‹lastmod› tag is one of the most useful. It tells search engines the last time a particular page was modified. For example:

Sitemap with lastmod

This tells Google: "Hey, we updated our About page on August 8, 2025."

If you publish blog posts, update product descriptions, or revise service pages, the ‹lastmod› tag helps Google recognize those changes and prioritize re-crawling them,which can boost their chances of appearing (or reappearing) in search results.

But for all this to work, the information you provide must be accurate, and that's where many site owners slip up.

Why the Accuracy of ‹lastmod› Matters to Google

Adding a ‹lastmod› tag to your sitemap might seem straightforward; just plug in today's date, right?

Not quite.

Google has made it clear that it will only use the ‹lastmod› value if it's consistently and verifiably accurate. In other words, you need to be honest and precise about when a page was actually updated.

What does "verifiably accurate" mean?

Google doesn't take your word for it blindly. It cross-checks the date in ‹lastmod› with other signals, like:

  • The actual content on the page: has it really changed?
  • HTTP headers (like Last-Modified)
  • The change history Google already knows about that page

If you're regularly updating the ‹lastmod› tag without making meaningful content changes - say, tweaking small layout details or changing a comma - Google may stop trusting it altogether. And once that happens, the tag is ignored and loses all SEO value.

Real vs. superficial updates

A common mistake is updating the ‹lastmod› date every time the page is touched, even if the change is tiny. For example:

  • Good update: You added a new section to a blog post, updated statistics, or rewrote key content.
  • Not helpful: You changed a font size or corrected a typo.

Only genuine content changes should trigger an update to ‹lastmod›. When used correctly, it helps Google:

  • Prioritize pages for crawling
  • Avoid wasting resources on unchanged pages
  • Understand that your site stays fresh and relevant

Being accurate with ‹lastmod› is a small effort that can make a real difference - if you respect the trust Google places in it.

How to Format ‹lastmod› Correctly (W3C Datetime Standard)

Now that you know how important the ‹lastmod› tag is - and why it needs to be accurate - the next step is getting the format right.

This part is technical but simple once you get the hang of it.

Google (and other search engines) expect the ‹lastmod› date to follow a specific format called the W3C Datetime standard. If your dates aren't in this format, they might be ignored - even if the information is accurate.

Two Valid Formats

You have two main options when writing your ‹lastmod› tag:

1 Date only (simple and widely used):

‹lastmod›2025-08-08‹/lastmod›

This format just tells Google the page was last updated on August 8, 2025.

2 Full date and time with timezone (more precise):

‹lastmod›2025-08-08T13:00:00+10:00‹/lastmod›

Let's break that down:

  • 2025-08-08 → The date (August 8, 2025)
  • T → A separator that means "time comes next"
  • 13:00:00 → 1:00 PM (in 24-hour format)
  • +10:00 → The timezone offset for Australian Eastern Standard Time (AEST) - covering Sydney, Melbourne, Brisbane during standard time (not daylight saving)

If you're updating your sitemap from an Australian server or publishing content locally, this timezone ensures your ‹lastmod› values reflect the correct time zone for your region.

Common Mistakes to Avoid
  • Wrong format:
    Example: ‹lastmod›08/08/2025‹/lastmod› → This will be ignored.
  • Missing leading zeros or separators:
    Dates like ‹lastmod›2025-8-8‹/lastmod› are invalid.
  • Random or fake timestamps:
    Don't make up dates just to seem active - Google may stop trusting your entire sitemap.

Sitemap.xml Best Practices (Beyond ‹lastmod›)

While the ‹lastmod› tag is important, a great sitemap follows a few other key rules too. Here are quick best practices to keep in mind:

  • Keep it clean: Only include live, canonical URLs (no redirects or broken links).
  • Update regularly: Reflect new, updated, or removed content in your sitemap.
  • Stay within limits: One sitemap can hold up to 50,000 URLs or 50MB uncompressed.
  • Submit to Google Search Console: Helps Google discover and crawl your site faster.
  • Use automation tools if possible: Many CMS platforms can auto-generate accurate sitemaps with proper ‹lastmod› formatting.

‹priority› Tag

By assigning priority tags to your pages in the sitemap.xml, you can help Google get a clearer understanding of the importance and hierarchy of your content. Your home page. landing pages and category pages should have a high priority 1.0 to 0.8.

Key SEO and pagination best practices

With an understanding of your sitemap.xml and the value it adds to SEO, decisions need to be made on less important pages on your site.

Pagination deserves a special mention because it is recommended to exclude paginated pages form your sitemap.xml.

Use the canonical metatag to define the page url. This avoids duplicates and wasting crawl resources of search engines. Google can discover paginated pages and make choices as to what to index.

Use Google Search Console to check for any indexing issues with your paginated pages.

A well-maintained sitemap not only helps Google understand your site - it shows you care about structure, accuracy, and the user experience.

Fresh Dates, Better Visibility

Think of your sitemap as your website's handshake with Google - and the ‹lastmod› tag as a friendly nudge that says, "Hey, I've got something new for you." When used correctly, it helps search engines crawl smarter and prioritize fresh, relevant content.

Be honest with your update dates, format them properly, and keep your sitemap tidy. A little care behind the scenes can go a long way in improving how your content shows up in search results.

Topics

Tags

Share:

A Gold Coast SEO and Web Developer