Writing nofollow in robots.txt actually does not take effect, which standards recognize which fields.
Why does the nofollow directive in robots.txt not work, and what fields are defined in the robots exclusion protocol standard?The answer is straightforward: there is no such instruction as nofollow in standard text. According to the standard, the robots exclusion protocol only has two groups of fields - User-agent statements specify which crawling program the rules apply to, and Disallow statements specify which paths are not allowed to enter.The 'nofollow' attribute is a meta tag instruction for web pages and does not belong to the file field of robots.txt. When written into a file, it will only be treated as an invalid line by standard parsing crawling programs.
Which fields are recognized in the standard
The standard text uses User-agent and Disallow to build the entire rule block: The file header declares which crawling program this set of rules is aimed at, and the following lines list the paths that are not allowed to enter. The rest of the writing cannot be found in this standard. When checking the problem of 'The rules are written but the crawler does not care', the first step is not to suspect the crawler, but to check whether the content is in the standard field list - the lines not in the list are as if they have not been written.
Which layer does nofollow belong to
Two nouns differ only by a suffix, but they belong to two different levels: robots.txt is a site-level crawling protocol, answering 'which paths should not be accessed'; webpage meta tags are document-level instructions, answering 'how to treat the pages already in hand'. nofollow belongs to the latter. Inserting the latter into the former is like putting an indoor notice on the community gate - in the wrong place, and the person reading it has no right to execute it.
Where to act to block crawling and to block inclusion
Do not be caught, configure robots: Fill in Disallow according to the path. Pay attention that only blocking crawling does not prevent indexing - the page may still be indexed due to external links, and displayed as a truncated abstract. If you want to completely exit the index, move the server: Confirm the old addresses that are offline and use 301 redirect to the replacement page, and clarify the address and weight destination; Directly close access to content that should not be made public. Both paths take care of one end, and using the opposite direction is equivalent to being busy for nothing.
Two common mistakes in on-site configuration
Firstly, after changing the pseudo-static rules, do not look back at robots: the path form has changed, and the rules written with the old path prefix in Disallow will be empty. Secondly, use robots.txt as an inclusion switch: it controls whether to enter or not, not whether to include or not. The AnQiCMS backend has made the Robots.txt configuration and 301 redirect management into two independent entries, which is designed according to these two lines - rules that should not be crawled should be written, and those that should not be indexed should be redirected or access closed.
Common questions
Question: If there is a nofollow line in the previous file, will there be any problems immediately?Answer: It won't happen immediately, but the standard parsing crawling program didn't execute this line at all. The effect you thought was effective has never been effective, and it is recommended to clean up and use the correct layer instead.
Question: If you want to temporarily prevent the column from being indexed, where should you start?Answer: First, judge whether it should be open to the outside: if it shouldn't be open to the outside, close the access and point the old link to the alternative page with 301; if you just don't want it to be indexed temporarily, use page-level control processing, don't force it into robots.txt.
Question: After adjusting the crawling rules, what is the order of checking?Answer: First, check if the new path prefix matches the existing Disallow entries; then follow the 301 redirect chain again to confirm there are no breakpoints; finally, check if the address has been switched to in the newly generated sitemap.