Where should the address of the site map be written, in the exclusion file or submitted to the search engine, and who should see each statement?
Where is the sitemap address written, in the exclusion file or submitted to the search engine console? Both declarations should be made for completeness: the original protocol states that 'the location of the sitemap can be specified using an exclusion file', and multiple sitemap entries can be listed in a single exclusion file;And submitting to the search engine side is another path, with different reading time and party. The protocol also gives a hard number for scale: a single site map file cannot exceed 50,000 addresses, the uncompressed volume cannot exceed 50 megabytes (the original writing is 50MB, that is 52,428,800 bytes), and the volume limit for the listed sub-files in the index file is also not more than 50,000, with the same upper limit.
At what time are the two statements read
The line in the exclusion file is for the crawling party who reads the rules first and then takes the content. The crawling program, by convention, will first take the exclusion file. Seeing the sitemap line, it knows where to find the complete list and does not need to be informed additionally. Its advantage is automatic: configured once, all crawling parties who act according to the rules can find it afterward.
This path is for the search side that needs to establish a site relationship. The submission action is usually accompanied by site ownership verification, and after submission, you can see the processing progress and entry status - these are feedback that cannot be provided by the exclusion file declaration.
The two are not substitute relationships. If you only write the exclusion file without submitting, the new site or revised version may be visited by no one for a long time; if you only submit without writing the exclusion file, those who only do routine crawling and do not follow the console will lose a discovery entry.
The original sentence in the agreement about location and limit
Three sentences can define the boundary of practice:
The location statement — 'The location of the sitemap can be specified using an exclusion file', the format is to add a line in the file containing the full address of the sitemap; and 'multiple sitemap lines can be specified in one exclusion file.'.
The scale limit statement — 'The number of addresses in each sitemap file cannot exceed 50,000, and the uncompressed size cannot exceed fifty gigabytes', the index file 'The number of listed sitemaps cannot exceed 500,000, and the size cannot exceed fifty gigabytes.'.
Here is a point that is easy to overlook: the upper limit is calculated based on 'uncompressed volume', and when the server is enabled for compressed transmission, the actual transmission volume is much smaller, but the piece judgment should be based on the uncompressed size.
The actual arrangement based on these two sentences is: when the content volume reaches tens of thousands, split the list into multiple files according to the column or type, and then list them with an index file; instead of writing a list of piece addresses one by one into the exclusion file, the exclusion file points to the index file.
The sequence of cooperation of two configurations within the site.
AnQiCMS supports automatic generation of sitemap, also supports robots and exclusion rules configuration, both need to be matched in order, otherwise the state of 'The list has been generated but no one knows' will appear.
The recommended order and corresponding relationship are as follows:
| Configuration item | On-site action | Who will read | Common omissions |
|---|---|---|---|
| Generate the site map | Confirm that the automatically generated list covers the required content types | Crawler | Draft or content to be published is included in the list |
| Exclusion file declaration | Write to the line pointing to the list location | Crawled by the crawler according to the rules | Only the default item was written, the shard index was not pointed correctly |
| Submit on the search side | Submit the list and retain the verification relationship | On the search console side | Did not resubmit after changing the domain or protocol |
| Link push | New content is actively pushed, supporting active push from Baidu and Bing | On the inclusion interface side | Treat the push as an alternative to the list declaration |
The fourth line is worth more than one sentence: The active push solves 'This new address needs to be seen as soon as possible', and the list solves 'Where are all the site addresses'. The former cannot replace the latter because the push has scale and rhythm restrictions, while the list is a comprehensive bottom account.
Common inconsistencies and self-checks
The most common is the inconsistency of the three categories.
The first is that the address pointed to by the file cannot be opened, or it returns HTML instead of the content list. It often occurs after the adjustment of the pseudo-static rules, and the list address is blocked by the rewrite rule.
The second is that there are external or test domain addresses in the list. Usually comes from historical data left by migration or experience environment, and the address prefix can be checked item by item.
The third is that the shard and index do not match. The index lists ten files, but actually generates twelve, or vice versa. It is recommended to generate a new index according to the generation results instead of manually maintaining that list.
The self-check action can be fixed into four steps: Check for the position line in the exclusion file; retrieve the address pointed to by that line and confirm it can be opened; check the number of entries in the list to see if it is close to the limit and if it needs to be split; confirm that the site status seen on the search side matches the address in the list.
Common questions
If it is written in the exclusion file and still needs to be submitted, is it a duplicate?No repetition. The former is a discovery mechanism, and the latter is a mechanism for establishing site relationships and obtaining feedback, with different uses.
What should be done if the number of entries in the list is close to the limit?Fragment according to protocol口径: Divide into multiple files, and then list them using an index file, with the exclusion file pointing to the index.
Do we need a separate one for multiple sites?Should. Exclude files and sitemap files to be effective independently per site, each site declares its own list address; cross-site refers to the same list causing confusion in address attribution.
Should the list include parameterized addresses?Screen according to the口径 of content management: only place the form that is expected to be crawled, keep consistent with the processing of in-site standard addresses, and do not conflict with each other in the two places.