如何告诉 Google 机器人某些链接不再存在
在网站的第一天,我在生成一些链接时犯了一个错误;遵循它们会输出数据库错误。
Google 机器人曾尝试跟踪这些链接,但现在它们在网站管理员工具中显示为抓取错误。 尽管我已经纠正了错误,但谷歌仍然尝试抓取它们。
如何告诉谷歌这样的链接不再存在并且它们不会通往任何地方?我无法执行 301 重定向,因为这会表明链接有效并且可以为它们建立索引。
In the first days of a website, I made a mistake in the generation of some links; following them outputs a database error.
Google bot has attempted to follow those links and now they appear as crawl errors in webmasters tools.
Although I have since corrected the error, google still tries to crawl them.
How to tell Google that such links no longer exist and that they lead to no where? I can't do a 301 redirect cause that would say that the links are valid and its ok to index them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果页面消失且没有逻辑替换,那么您通常应该返回
404
错误,但在这种情况下,我会考虑返回410 Gone
- 这表明该页面已被删除永久删除,永远不会返回,应该从谷歌索引中清除。可能值得在现有代码库中查找有问题的 url,以确保不存在指向它们的链接。
至于301,301并不代表链接有效,301是永久移动的。这告诉谷歌,它过去在这里查找的页面现在位于其他地方,并将谷歌引导到新位置。从事物的声音来看,不适用于您的情况,但与您描述的方式略有不同。
有关详细信息,请参阅http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
If the page is gone with no logical replacement then you should normally return a
404
error, in this case however I would consider returning410 Gone
- which indicates that the page has been permanently removed never to return and should be purged from googles indices.Its probably worth greping your existing codebase for the url's in question to ensure that no links remain to them.
As for the 301's 301 doesn't mean the link is valid, 301 is moved permanently. This tells google that the page it used to look for here now lives elsewhere and directs google to the new spot. Not applicable in your case from the sounds of things but subtly different from the way you described it.
For more information see http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
我只需在您的 robots.txt 中标记它们
http://www.robotstxt.org/robotstxt.html
I would just mark them in your robots.txt
http://www.robotstxt.org/robotstxt.html