How many addresses can a single sitemap file hold, and how should it be split if it exceeds the limit?

📅 October 12, 2026 👁️ 7

The single Sitemap file can contain how many addresses, the protocol specifies a simultaneous effective limit of two: the number of addresses does not exceed 50,000, and the uncompressed file size does not exceed 50MB. If either of the two reaches the limit first, the content should be split into multiple Sitemap files, and each segment should be listed one by one by an index file (Sitemap index). When the scale of the site exceeds this level, the correct action is to split it, rather than retain only the first 50,000, or hope for the volume to pass after compression.

How is the limit calculated?

The limit of the number of objects that can be parsed at one time is managed, and the limit of the volume of the original bytes to be read is managed separately. Addresses with longer query parameters are more likely to exceed the volume limit first, while pure article pages are more likely to exceed the number of items limit. The protocol also requires that the file itself use UTF-8 encoding and data values to be escaped, which are two things that are easily overlooked: when the address contains Chinese characters or parameters with &, if not escaped, it will cause the entire file to fail to parse, and it is more difficult to troubleshoot than exceeding the limit.

It should be noted that the wording of the agreement is aimed at 'each provided sitemap file', the index file is also within the scope of the same sentence, when planning to split, the index file itself should also be controlled at the same level, and it should not be regarded as an unlimited summary container.

How to determine the directory after splitting

Character What to put inside Who reads it The behavior when an error occurs
Sub-sitemap file A batch of specific page addresses and their change time Crawling scheduling Exceeded the number or volume, the whole batch is rejected
Index file List of addresses for each sub-map file Crawling scheduling Omitted a sub-map, and those addresses will not be discovered for a long time
Submission entry Address of index file or split sub-map Administrator backend, external tools Submitted sub-map has been changed to split, pointing to an empty file

The principle of directory naming is stability and predictability. It can be divided by content module or by address area, but once decided, it is best not to change the path: every time you change the filename, the previously submitted addresses will point to an empty file, and it takes time to find a new batch of addresses. If it is necessary to change, cooperate with 301 redirect to point the old address to the new summary entry to avoid the situation where 'the submission list has it, but the content cannot be found.'

How to configure the background

The site map of AnQiCMS (AnQi CMS) is automatically generated by the background, and the slicing and indexing structure is produced according to the scale of the site. The three things that the site owner needs to confirm are:

First, the static rule determines the address form. Rule changes will cause the overall change of historical addresses, and the generator will produce completely different fragment content accordingly. Such changes should be launched simultaneously with the redirect table, and not just on one side.

Second, the submission and push channels should point to the summary entry. Use the index file address as the external submission address, so that new fragments can be automatically included, which is more convenient than submitting sub-maps one by one; at the same time, link push is still notifying new content piece by piece, and the site map is responsible for full-scale verification. The two channels do not replace each other.

Third, verify by sampling instead of just checking the existence of files. Randomly open a slice, confirm that the address quantity, encoding, and last modified time fields are all present, which is more reliable than staring at the green status on the background. For multilingual sites, also confirm that each language branch appears in the corresponding slice, to avoid the situation where a whole branch of a language is missing from the list.

Common questions

Question: Can the volume after compression be used as a judgment standard?Answer: No, the protocol sets limits based on the uncompressed volume, and compression only affects transmission.

Question: If the site is just about to reach the limit, do we need to shard now?Answer: It is recommended to split in advance. If the limit is exceeded, the entire batch will be rejected, resulting in the loss of discovery opportunities for all addresses, while splitting in advance has almost no additional cost.

Question: Can we split by year, such as one file per year?Answer: Yes, provided that the number of pieces per year does not reach the limit, and new pieces will continue to be appended to the index file. The benefit of splitting by year is that the historical file path is stable.

Related articles

Add integrity verification to external scripts, why do you still need to explicitly write cross-domain attributes in the tag?

When adding integrity check to external scripts, the cross-domain attribute must be explicitly written in the tag, because resources with integrity check must go through cross-domain requests, otherwise the browser will not consider the check result as available. The check value consists of an algorithm prefix plus an encoded hash, and multiple summary alternatives can be provided at the same time. This article explains where the check occurs, the format and alternatives, as well as how to batch verify reference points after template changes.

2026-10-11

Content security policy reports first and does not block, deciding to really block after seeing what happens

Content Security Policy runs in only-report mode first, used to collect violation records without blocking execution, which is a gray-scale method before going live with intercept rules. There are two ways to write the report target, new browsers will ignore the old address, and both should be written during the compatibility period. This article explains what types of information to look at during the gray period, when to cut off the intercept, and how to avoid a blank screen when changing the template.

2026-10-11

The large attachment upload is blocked at 413, why is it not understandable in the browser?

When uploading a large attachment, it is blocked by the gateway and returns 413. Browsers often cannot display the reason because the limit is set before the request enters the application, and the program does not have time to take over. The default limit for this type of nginx is about one megabyte, which can be set by segment according to the site and location. This article explains which segment the limit controls, why the error is difficult to read, and how to check the three types of entry points for attachment upload, batch import, and interface upload.

2026-10-11

What codes should be returned for deleted articles and hidden columns, and what consequences will there be if they are all compressed into 404?

When deleting content or hiding columns, if the status code is unified to 404, the still existing paths will be read as expired. This article gives the landing points for the four types of semantics: delete, hide, reject, and exception, and explains how the recycling station, draft, and pending publication status within the site correspond to the front-end return, and attaches a list of standards for reference

2026-10-11

How to fill in the last modified time in the sitemap so that it is easy to be accepted.

The last modified time in the sitemap should be filled in according to the actual change: the protocol requires the use of W3C Datetime format, which can only be written as a date; changefreq and priority are defined as hints rather than instructions, and full-site refresh will only make the crawler treat this field as noise. This article explains the protocol meaning of this field, the four common ways it is filled incorrectly, how to obtain the real change time from the content status, and the time scope to be noted when配合 with timed publishing.

2026-10-12

Forms and comments are flooded by robots, besides the captcha, what else can be done to add several layers?

Form and comment anti-robot spambot prevention, CAPTCHA only blocks the automatic submission layer, and cannot block scripts that have bypassed verification and low-cost manual submissions. The layered叠加 can be: submission verification (reCAPTCHA CAPTCHA, timestamp and honeytrap fields), content filtering (sensitive word filtering, keyword replacement, content review), publishing strategy (review before posting, pending publication status, frequency limit and login threshold). This article explains the limitations of each layer, as well as what to adjust when all three layers cannot block it.

2026-10-12

Whether to install the preview version on the production station, and how to choose between Release Candidate and formal version

The candidate version is at the final stage of the release process, the purpose is to let people verify the upcoming packaged final version, not the version for daily use on production stations. This article uses the recent example of Joomla simultaneously releasing 6.2 candidate version and 5.x, 6.x dual branch security repair announcements to explain where the candidate version should run, which branch to upgrade first when running dual version lines in parallel, and the backup and rollback points that must be prepared before the upgrade.

2026-10-12

When scheduling content and batch importing at the same time, what should be paid attention to in content scheduling?

Scheduled release and batch import together, the key to scheduling is in state division: the documents imported in batch are first stored as draft or pending release, and then released peak-time with scheduled release. This article explains the meaning of each of the four document states: formal, draft, pending release, and recycling bin, how to verify the draft link with preview parameters, the troubleshooting sequence of missing fields in import, and how to recover deleted content through the recycling bin.

2026-10-12