【发布时间】:2014-12-10 14:51:14
【问题描述】:
我有一个新闻网站,数据库中有近 200 000 条新闻。我将它们拆分为每个文件包含 1000 个链接的子 xml 文件。
我的站点地图xml 看起来像:
<sitemap>
<loc>http://example.com/sitemap_categories.xml</loc>
<lastmod>2014-11-10T16:01:08+02:00</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/sitemap_news_200.xml</loc>
<lastmod>2014-12-10T16:01:08+02:00</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/sitemap_news_199.xml</loc>
<lastmod>2014-12-10T16:01:08+02:00</lastmod>
</sitemap>
<sitemap>
<loc>http://example.com/sitemap_news_198.xml</loc>
<lastmod>2014-12-10T16:01:08+02:00</lastmod>
</sitemap>
...
直到 sitemap_news_0。
这是一个正确的方法吗?我应该像上面写的那样将所有内容都放在 sitemap.xml 中还是只索引今天或几个月的新闻?
【问题讨论】: