- Why this matters for SEO
- Setting the lastmod tag
- The situation before lastmod tag was important
- Conclusion
- FAQ Section
One of the most important elements in an XML sitemap is the <lastmod> tag. In this post, I’ll explain why the <lastmod> tag matters and how to use it correctly.
Why this matters for SEO
Basically, the <lastmod> tag tells search engines the last time a page was updated. This info helps them figure out how often to crawl your site and which pages need to be re-indexed. When you include this tag, it gives search engines a clearer picture of your content’s freshness.
On the flip side, if you skip the <lastmod> tag, search engines might miss updates—or waste resources crawling pages that haven’t changed. That can hurt your SEO in the long run
Setting the lastmod tag
To add the <lastmod> tag to your sitemap, you’ll need to place it inside the <url> tag for each page you want to include. The date should follow the W3C Datetime format. The most common versions are either just the date—like 2024-11-24—or the full date and time, such as 2024-10-15T20:12:30+01:00. Make sure the date you use reflects the last time that specific page was updated.
The situation before lastmod tag was important
Before Google and Bing started putting more focus on it, the <lastmod> tag was mostly optional, and honestly, a lot of people either skipped it or used it the wrong way.
That led to some problems. Search engines weren’t always sure when content had really been updated, which made crawling and indexing less efficient. In many cases, site owners would reset the <lastmod> date every time they regenerated the sitemap, even if nothing on the page had actually changed. That just confused search engines and wasted crawl resources.
Conclusion
To wrap it up, the <lastmod> tag plays a key role in your sitemap. When used correctly, it helps search engines crawl your site more efficiently, boosts indexing accuracy, and can even improve your visibility in search results. Just make sure you’re keeping the <lastmod> date accurate and up to date—it’s a small detail that can make a big difference in your SEO.
FAQ Section
The lastmod tag in sitemaps indicates when a page was last updated, helping search engines quickly re-crawl fresh content.
The current Google documentation says, “Google uses the lastmod value if it’s consistently and verifiably (for example by comparing to the last modification of the page) accurate.”
Google generally crawls a website anywhere from once every three days to four weeks.




