views:

381

answers:

2

Hello,

I've a really small website, so I usually update the sitemap by hand! In each "url" element there are the fields: loc, lastmod, changefreq and priority.

The "lastmod" field is setup to the date in witch I update the content of the related PHP page or the content that is loaded dynamically in the related PHP page!

I've tried to use http://www.xml-sitemaps.com/ to verify if all it was right, and I've noticed that in the generated sitemap there isn't the "lastmod" field!

In the Google wiki, about how to write a sitemap, there's written that is a good practice to setup the "lastmod" field even for dynamic pages; so, my question is ...

Is the "lastmod" field needed or not?

Thanks in advace!

A: 

It's not mandatory but it's good to have it in order to let Google (and other engines) know when content updates happen on your site.

cherouvim
Thanks for the reply!
BitDrink
A: 

The standard says that it's optionnal : http://www.sitemaps.org/protocol.php#locdef :

<lastmod> optional

The date of last modification of the file. This date should be in W3C Datetime format. This format allows you to omit the time portion, if desired, and use YYYY-MM-DD.

Still, it might be usefull to let search engines / spiders know when your content was updated for the last time.


The How do I compute lastmod date? entry of the FAQ also gives an interesting reason, that explains why you should include the lastmod date if you can (quoting) :

Using even an approximate date or timestamp can help crawlers avoid crawling URLs that have not changed. This will reduce the bandwidth and CPU requirements for your web servers.

Pascal MARTIN