大网数据广告活动
网站运营与故障问答

When should I update lastmod value in the sitemap?

· 52CE 我爱测

I have a website like Stackoverflow. I'm creating a sitemap for it. I want to know, what timestamp should be as the value of last-modified for a page? (a question and all its answers) All I'm trying to understand is when exactly …

问题原文

原帖链接 · Martin AJ · CC BY-SA 4.0

I have a website like Stackoverflow. I'm creating a sitemap for it. I want to know, what timestamp should be as the value of last-modified for a page? (a question and all its answers)

All I'm trying to understand is when exactly should I update the value of lastmod in a question and answer website? When someone leaves a comment under an answer, should I update lastmod of that page? When either the question or an answer is edited, should I update lastmod?

I can update it every time after each minor change in the content of the page (a commend added/deleted, a answer added/deleted, either question of answer edited). But I'm worried about google, I'm not sure will google skip (not recrawl) us after a while because of our minor changes? Can google understand the content of the page is changed, probably a little bit, but anyway it is changed. Or it just cares about huge changes? And will ignore minor changes?

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

Google doesn't use the lastmod value in sitemaps: Google Says They Mostly Ignore the lastmod Tag In XML Sitemaps

The lastmod, changefreq, and priority are not worth including in your sitemap at all. They just take up extra space and don't do anything for you. I'd recommend making your sitemap as compact as possible with just a list of URLs:

<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://www.example.com/</loc></url>
<url><loc>https://www.example.com/page1.html</loc></url>
<url><loc>https://www.example.com/page2.html</loc></url>
...

Chances are though that you don't even need a sitemap at all.

  • Sitemaps don't help your pages get indexed
  • Sitemaps don't don't help with rankings
  • Linking to your pages from other pages is the only way to get your pages reliably crawled, indexed, and ranked well.

At best sitemaps give you extra info in Search Console and can get Google to crawl pages that are not linked from anywhere. Even when Google crawls unlinked pages it usually chooses not to index them because they don't have any inbound links. They certainly won't rank for anything competitive. See The Sitemap Paradox.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。