问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
