如何修复 - 已编入索引,但被 robots.txt 阻止?

How to fix - Indexed, though blocked by robots.txt?

我刚刚收到一封关于我网站的索引覆盖率问题的电子邮件。 以下文件由 Google 索引:

root-of-my-site/files/custom.js

请注意,尽管 Google 已从该文件夹中索引了 URL,但我已在我的 .htaccess 中禁止使用 /files 文件夹。

请告诉我如何永远取消索引我的 URL!

请阅读 Goole 本身的这篇文章:https://support.google.com/webmasters/answer/7440203?hl=en

一些来自那里:

Indexed, though blocked by robots.txt: The page was indexed, despite being blocked by robots.txt (Google always respects robots.txt, but this doesn't help if someone else links to it). This is marked as a warning because we're not sure if you intended to block the page from search results. If you do want to block this page, robots.txt is not the correct mechanism to avoid being indexed. To avoid being indexed you should either use 'noindex' or prohibit anonymous access to the page using auth. You can use the robots.txt tester to determine which rule is blocking this page. Because of the robots.txt, any snippet shown for the page will probably be sub-optimal. If you do not want to block this page, update your robots.txt file to unblock your page.

您可以观看此视频了解更多详情:https://www.youtube.com/watch?v=WlniBqL_0Zc