Don't want the page to appear in the search results, is it marked in the page or written in the exclusion rules in the file?
First, clarify which layer needs to be blocked: The exclusion rules in the file block crawling, while the exclusion tags on the page block indexing. To prevent the page from appearing in search results, use page-level exclusion tags while ensuring that the crawling party can still read this page; Writing a prohibition rule in the robots file does not mean that it will not be included. There are explicit documents at the protocol level, stating that pages blocked by the robots file may still be included if there are other sources pointing to them. They manage two different things.
They manage two different things.
Crawl control determines whether 'this address can be read', index control determines whether 'the content read should appear in the results'. The Disallow in the robots file acts on the former: after the path is blocked, the crawler will not request this address.Page exclusion tags (commonly noindex and similar) affect the latter: The crawler still requests and reads the page and knows from the tags or headers in the response that this page should not be indexed.In the public document, that sentence 'The spider still needs to access the resource to read the header information and meta tags' refers to this dependency - the exclusion tag must be effective, and the page must be accessible.
Why only writing file exclusion rules can cause omissions.
Because blocking crawling will make the exclusion tags unreadable. Once the path is prohibited in the file, the crawler cannot obtain the page content, nor can it see the exclusion intention written on the page; and if this page is still linked by other pages, the indexing side can retain a record based on the link and existing URL information, presented as a
Which one should be used for the preview page and parameter address?
Draft links within the site require preview parameters to access. This type of address belongs to the category that needs to be indexed: it is readable to the outside, but the content is not finalized, and it will appear as an old version or a half-finished page if included in the index. The division of labor is as follows: preview and unissued content use page-level exclusion markers,配合 parameterized addresses not to enter the sitemap; batches of background directories, attachment directories, and other paths that do not need to be crawled are blocked by file-level rules to save quotas. The site's robots configuration is responsible for generating and maintaining rules at the file level, while the intention at the index level should be reflected on the page.
Configuration sequence and verification method
| Purpose | Which one to use | Prerequisites | Common misuse |
|---|---|---|---|
| Do not appear in the results | Page-level exclusion mark | This page can still be crawled | Prohibit this path only in files |
| Preview and parameterized address | Page-level exclusion mark | Do not write parameter address in the list | When the official page is pushed together |
| The entire background directory saves quota | File-level exclusion rule | The directory does not contain content that needs to be indexed | Use it as a means of not including |
| Content that has been taken offline has been included | Exclude tags or return a correct status code | Wait for the re-crawl to take effect | Directly block crawling |
In terms of sequence, first define the page-level intent, then define the file-level scope, to avoid the latter blocking the former. Verification needs to wait for the re-crawl, and changes will not take effect immediately in the results; at the same time, check the two places of pseudo-static and site map: if this address is still on the list, or there are still links pointing to it within the site, there is a reason to continue retaining it in the indexing side. Official documents that have been taken offline should be removed from the list, rather than left in it depending on the exclusion tags to cancel each other out.
Common questions
Ask: If the exclusion mark is added but it is still in the results, does it not take effect?Answer: First, check if this path is blocked by file rules for crawling - if you can't read the page, you can't read the mark. Second, check if a re-crawl has occurred, as there may be delays in index-level changes.
Ask: How to block the whole site test period?Answer: You can use access control or file-level rules in the test environment; once the domain is to be officially launched, change each item to page-level intent to avoid formal content being unreadable due to file rules.
Ask: Do you need to write rules individually for addresses with parameters?Answer: No need. The principle of handling parameter addresses is not to enter the list, not to give formal indexing intent, which is more convenient than writing exclusion rules one by one and is less likely to be omitted.