I have a static HTML website that i update manually, most of the time these updates are text amendments, additions, edits, rather than adding new pages.

Do i need to update my sitemap.xml after each update of content ?

I was looking at the xml and noticed the second line, last mode indicates a modification date. In a CMS like wordpress i guess the sitemap is automatically updated, but should i regenerate the sitemap each time i make an edit as described above ?

  • Technically, yes. But the effects of a sitemap for a small website are minimal as is. Let alone the effect of a lastmod value – Martijn Mar 6 '17 at 10:41
  • Btw, you don't need a dynamic page doing the sitemap for you. Static page generators like, e.g., pelican usally have sitemap plugins. – Marcus Mar 15 '17 at 18:37
  • John Muller says that if the change is meaningful, ie not cosmetic or of low-value, then you shouldn't update and notify google. For eg: for an ecommerce, if price changes, you should but if you change a few words in product description, then you shouldn't. When google bot comes on your notification and finds that the changes are not important, it's a loss of resources. – Ethan Collins Mar 15 '17 at 20:49

It is good practice to update the sitemap when new content is added to the site, or existing content is updated, or deleted. This however does not assure it will be taken into consideration. While Google and in fact most web crawlers use the sitemap file for helping direct the crawling efforts it doesn't control crawling. If you update the page content most crawlers will detect this when they re-crawl the page, however simply updating the sitemap with the new lastMod date and time won't compel them to rather it will be taken as a signal to indicate that the content may have been updated and the crawler may crawl it sooner, or may wait until the next scheduled crawl.

| improve this answer | |
  • Thanks, do you happen to know if the <lastmod> element is even required ? – sam Mar 6 '17 at 14:37
  • 1
    Not required at all, it's an optional element so you can quite safely leave it out. – Chris Rutherfurd Mar 6 '17 at 23:55
  • 2
    <lastmod> I find that it's better to use it -- allows google to know which page has changed. In this way, the 'cost' that google allocates for scanning your site is appropriate. Then, in future when you have major updates, which will need you to change the lastmod for all those, then google will respect it better. But, as said, lastmod is optional. – Ethan Collins Mar 15 '17 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.