google sitemap.xml 文件大小限制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2887358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 13:06:57  来源:igfitidea点击:

Limitation for google sitemap.xml file size

xmlsitemap

提问by Chakrapani

can any one please let me know the memory limitation(MB) of google sitemap.xml file size.

任何人都可以让我知道google sitemap.xml文件大小的内存限制(MB)。

回答by kolunar

According to the Latest Update: 01 Jan 2017

根据最新更新:2017 年 1 月 1 日

Any Sitemap file is limited to 50MB(uncompressed) with a maximum of 50,000URLs.

任何站点地图文件都限制为50MB(未压缩),最多包含50,000 个URL。

And a Sitemap index file(not to be confused with a Sitemap file) can include up to 50,000Sitemaps.

一个站点地图索引文件(不要与站点地图文件混淆)最多可以包含50,000 个站点地图。

So, for a singleSitemap index file, the maximum capacity of URLs and storage could be calculated as described below:

因此,对于单个站点地图索引文件,URL 和存储的最大容量可以如下计算:

in terms of URLs:

在 URL 方面:

50,000sitemaps = ( 50,000* 50,000) URLs = 2,500,000,000URLs

50,000 个站点地图 = ( 50,000* 50,000) URL = 2,500,000,000 个URL

Note: Google supports several sitemap formats but still, all formats limit a single sitemap to 10MB(uncompressed) and 50,000 URLs. Please also refer to the sitemap index file's schema as being defined here.

注意:Google 支持多种站点地图格式,但所有格式仍将单个站点地图限制为10MB(未压缩)和 50,000 个 URL。另请参阅此处定义的站点地图索引文件的架构。

in terms of size:

在尺寸方面:

50MB + (50,000sitemaps * 50MB) = 2,500,050MB = > 2.3TB

50MB +(50,000 个站点地图 * 50MB)= 2,500,050MB = > 2.3TB

So altogether, we can have maximum 2,500 millions URLsby submitting a single site map index file and we can have around 2TBof storage for all sitemap files which are included in the site map index file.

因此,通过提交单个站点地图索引文件,我们总共可以拥有最多25 亿个 URL,并且我们可以为站点地图索引文件中包含的所有站点地图文件提供大约2TB的存储空间。

Since we can submit up to 500sitemap index files to Google see here, the conclusion is:

由于我们最多可以向Google提交500 个站点地图索引文件(参见此处),因此得出的结论是:

(500* 2,500) millions URLs limit with the size of (500* 2) TB

( 500* 2,500) 百万个 URL 限制,大小为 ( 500* 2) TB

Reference:

参考:

Schema for Sitemap index filesSchema for Sitemap index files

站点地图索引文件的架构站点地图索引文件的架构

Sitemap formats: Google Webmaster Console

站点地图格式谷歌网站管理员控制台

Google supports several sitemap formats such as XML, RSS, mRSS, Atom 1.0 and Text.

Google 支持多种站点地图格式,例如 XML、RSS、mRSS、Atom 1.0 和文本。

All formats limit a single sitemap to 10MB(uncompressed) and 50,000URLs. If you have a larger file or more URLs, you will have to break your list into multiple sitemaps. You can optionally create a sitemap index file (a file that points to a list of sitemaps) and submit that single index file to Google. You can submit multiple sitemaps and/or sitemap index files to Google.

所有格式都将单个站点地图限制为10MB(未压缩)和50,000 个URL。如果您有更大的文件或更多的 URL,则必须将列表分成多个站点地图。您可以选择创建站点地图索引文件(指向站点地图列表的文件)并将该单个索引文件提交给 Google。您可以向 Google 提交多个站点地图和/或站点地图索引文件。

How big can my Sitemap be?: Sitemaps.org

我的站点地图可以有多大?: Sitemaps.org

Sitemaps should be no larger than 50MB(52,428,800 bytes) and can contain a maximum of 50,000URLs. These limits help to ensure that your web server does not get bogged down serving very large files. This means that if your site contains more than 50,000 URLs or your Sitemap is bigger than 50MB, you must create multiple Sitemap files and use a Sitemap index file. You should use a Sitemap index file even if you have a small site but plan on growing beyond 50,000 URLs or a file size of 50MB. A Sitemap index file can include up to 50,000 Sitemaps and must not exceed 50MB (52,428,800 bytes). You can also use gzip to compress your Sitemaps.

站点地图不应大于50MB(52,428,800 字节),最多可包含50,000 个URL。这些限制有助于确保您的 Web 服务器不会因为处理非常大的文件而陷入困境。这意味着如果您的站点包含超过 50,000 个 URL 或您的站点地图大于 50MB,您必须创建多个站点地图文件并使用站点地图索引文件。即使您的站点很小,但计划增加超过 50,000 个 URL 或 50MB 的文件大小,您也应该使用站点地图索引文件。一个站点地图索引文件最多可包含 50,000 个站点地图,并且不得超过 50MB(52,428,800 字节)。您还可以使用 gzip 来压缩您的站点地图。

回答by Abhishek Goel

NOTE : Updated Limits ( as of Sep 10 2016 )

注意:更新限制(截至 2016 年 9 月 10 日)

updated limits are

更新的限制是

Number of URLs = 50,000
File size ( uncompressed ) = 10MB

Source : Official Google Guidelines

来源:官方谷歌指南

According to source :

根据消息来源:

A sitemap file can't contain more than 50,000 URLs and must be no larger than 10 MB uncompressed. If your Sitemap is larger than this, break it into several smaller Sitemaps. These limits help ensure that your web server is not overloaded by serving large files to Google.

一个站点地图文件不能包含超过 50,000 个 URL,并且在未压缩时不得超过 10 MB。如果您的站点地图比这大,请将其分解为几个较小的站点地图。这些限制有助于确保您的网络服务器不会因向 Google 提供大文件而过载。

For other users, Please ignore the forum links given on other answers,
because those links point to static pages which are not updated.

对于其他用户,请忽略其他答案中给出的论坛链接,
因为这些链接指向未更新的静态页面。

回答by Shri

UPDATED limits from Nov 30 2016

自 2016 年 11 月 30 日起更新限制

File size limit has been increased to 50MB per uncompressed file& URL limits remain 50,000 URLs per sitemap / sitemap index

文件大小限制已增加至50MB per uncompressed file& URL 限制保持不变50,000 URLs per sitemap / sitemap index

You can provide multiple Sitemap files, but each Sitemap file that you provide must have no more than 50,000 URLs and must be no larger than 50MB (52,428,800 bytes). If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement; however the sitemap file once uncompressed must be no larger than 50MB. If you want to list more than 50,000 URLs, you must create multiple Sitemap files.

If you do provide multiple Sitemaps, you should then list each Sitemap file in a Sitemap index file. Sitemap index files may not list more than 50,000 Sitemaps and must be no larger than 50MB (52,428,800 bytes) and can be compressed. You can have more than one Sitemap index file. The XML format of a Sitemap index file is very similar to the XML format of a Sitemap file.

您可以提供多个 Sitemap 文件,但您提供的每个 Sitemap 文件的网址不得超过 50,000 个,且不得超过 50MB(52,428,800 字节)。如果您愿意,您可以使用 gzip 压缩您的站点地图文件以减少您的带宽需求;但是,解压缩后的站点地图文件不得超过 50MB。如果要列出 50,000 个以上的 URL,则必须创建多个站点地图文件。

如果您确实提供了多个站点地图,则应该在站点地图索引文件中列出每个站点地图文件。站点地图索引文件列出的站点地图不得超过 50,000 个,并且不得超过 50MB(52,428,800 字节)并且可以压缩。您可以拥有多个站点地图索引文件。站点地图索引文件的 XML 格式与站点地图文件的 XML 格式非常相似。

Source https://www.sitemaps.org/protocol.html#otherformats

来源https://www.sitemaps.org/protocol.html#otherformats

For those who are still confused about the 10MB limit mentioned on the google suppport page, that page is not updated as they announced the changes on Nov 30, 2016.

对于那些仍然对 google 支持页面上提到的 10MB 限制感到困惑的人,该页面没有更新,因为他们于 2016 年 11 月 30 日宣布了更改。

Announcement by google : https://twitter.com/googlewmc/status/803884180266479616Announcement by bing : https://blogs.bing.com/webmaster/November-2016/Increasing-the-size-limit-of-Sitemaps-file-to-addr

由谷歌宣布:https://twitter.com/googlewmc/status/803884180266479616由冰公告:https://blogs.bing.com/webmaster/November-2016/Increasing-the-size-limit-of-Sitemaps-file到地址

TL;DR

TL; 博士

Limit for Sitemap Files : 50,000 URLs& 50MB uncompressed file size

Limit for Sitemap Index Files : 50,000 Sitemaps& 50MB uncompressed file size

站点地图文件的限制:50,000 URLs&50MB uncompressed file size

站点地图索引文件的限制:50,000 Sitemaps&50MB uncompressed file size

回答by Pekka

According to a claim in the Wikipedia article, the limit is 50,000 URLs and 10 MB (uncompressed) per sitemap. I think this number is from the Google Webmaster FAQ (can't find the official entry but this Google groups entrysays the same.)

根据维基百科文章中的声明,每个站点地图的限制为 50,000 个 URL 和 10 MB(未压缩)。我认为这个数字来自谷歌网站管理员常见问题解答(找不到官方条目,但这个谷歌组条目说的是相同的。)

Not sure whether this limit applies to the other search engine providers as well.

不确定此限制是否也适用于其他搜索引擎提供商。

回答by tomvon

The information you're looking for is located at the link below under "Guidelines for Sitemaps". This comes straight from the horse's mouth as they say.

您要查找的信息位于下面“站点地图指南”下的链接中。正如他们所说,这直接来自马口。

http://www.google.com/support/webmasters/bin/answer.py?answer=183668

http://www.google.com/support/webmasters/bin/answer.py?answer=183668

回答by sadiq

I have reached this question while developing for 100K products sitemap.

我在开发 100K 产品站点地图时遇到了这个问题。

And limits are

和限制是

  1. 50K URL

  2. 50 MB file size limit

  1. 50K 网址

  2. 50 MB 文件大小限制

To stay safe I think multiple sitemaps will help.

为了保持安全,我认为多个站点地图会有所帮助。

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      <loc>http://www.example.com/sitemap_1.xml</loc>
      <lastmod>2018-01-02T15:11:46+06:00</lastmod>
   </sitemap>
   <sitemap>
      <loc>http://www.example.com/sitemap_2.xml.gz</loc>
      <lastmod>2018-01-01T15:11:46+06:00</lastmod>
   </sitemap>
   </sitemapindex>

回答by Tarek Koudsi

The answer is clear on the official sitemaps.org:

官方sitemaps.org上的答案很清楚:

You can provide multiple Sitemap files, but each Sitemap file that you provide must have no more than 50,000 URLs and must be no larger than 10MB (10,485,760 bytes). If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement; however the sitemap file once uncompressed must be no larger than 10MB. If you want to list more than 50,000 URLs, you must create multiple Sitemap files.

您可以提供多个 Sitemap 文件,但您提供的每个 Sitemap 文件的网址不得超过 50,000 个,且不得超过 10MB(10,485,760 字节)。如果您愿意,您可以使用 gzip 压缩您的站点地图文件以减少您的带宽需求;但是,解压缩后的站点地图文件不得大于 10MB。如果要列出 50,000 个以上的 URL,则必须创建多个站点地图文件。

tl;dr sitemaps.xml must be < 10mb when uncompressed, regardless if you're gzipping it or not

tl;dr sitemaps.xml 解压缩时必须小于 10mb,无论您是否对其进行 gzip