站点地图索引是否应该包含扩展名为 .gz 的子站点地图?
Should sitemap index contain child sitemaps with .gz extension?
问题:子站点地图是否需要.gz
扩展名?
这是我发现的:
Google 提供以下站点地图索引 example:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.example.com/sitemap1.xml.gz</loc>
<lastmod>2004-10-01T18:23:17+00:00</lastmod>
</sitemap>
<sitemap>
<loc>http://www.example.com/sitemap2.xml.gz</loc>
<lastmod>2005-01-01</lastmod>
</sitemap>
</sitemapindex>
可以在 sitemaps.org 上找到非常相似的示例。根据 sitemaps.org:
<loc>
- Identifies the location of the Sitemap. This location can be a
Sitemap, an Atom file, RSS file or a simple text file.
这两个示例都没有指定关于 .gz
的任何内容,而且我找不到任何不包含 .gz
的站点地图索引示例。但是,我的所有子站点地图都没有压缩,我想知道这样做是否正确。
不,不需要对文件进行 gzip 压缩。来自 Sitemaps.org Protocol:
If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement…
Google 自己引用未压缩的站点地图文件:https://www.google.com/sitemap.xml
问题:子站点地图是否需要.gz
扩展名?
这是我发现的:
Google 提供以下站点地图索引 example:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://www.example.com/sitemap1.xml.gz</loc>
<lastmod>2004-10-01T18:23:17+00:00</lastmod>
</sitemap>
<sitemap>
<loc>http://www.example.com/sitemap2.xml.gz</loc>
<lastmod>2005-01-01</lastmod>
</sitemap>
</sitemapindex>
可以在 sitemaps.org 上找到非常相似的示例。根据 sitemaps.org:
<loc>
- Identifies the location of the Sitemap. This location can be a Sitemap, an Atom file, RSS file or a simple text file.
这两个示例都没有指定关于 .gz
的任何内容,而且我找不到任何不包含 .gz
的站点地图索引示例。但是,我的所有子站点地图都没有压缩,我想知道这样做是否正确。
不,不需要对文件进行 gzip 压缩。来自 Sitemaps.org Protocol:
If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement…
Google 自己引用未压缩的站点地图文件:https://www.google.com/sitemap.xml