从搜索引擎(Google)结果中删除Web服务(ASMX) [英] Remove Web Service (ASMX) From Search Engine (Google) Results

查看:92
本文介绍了从搜索引擎(Google)结果中删除Web服务(ASMX)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 www.mysite.com/SomePath/SomeService.asmx 上有一个Web服务.当我在Google上搜索"inurl:mysite.com"时,我将该网络服务作为结果之一.我希望该Web服务不会出现在搜索结果中.

我尝试添加robots.txt文件以将/SomePath/从搜索结果中排除,但这似乎还没有奏效(尽管只有一两天,所以可能会花费更多时间).另外,我无法从所有其他已爬网页面中删除到该Web服务的链接",因为我非常确定ASP.NET会在引用该Web服务的任何页面上包括该链接.我正在使用以下语法来引用Web服务:

I have a web service at www.mysite.com/SomePath/SomeService.asmx. When I search on google for "inurl:mysite.com", I get that web service as one of the results. I would like that web service to not show up in the search results.

I have tried adding a robots.txt file to exclude /SomePath/ from search results, but that hasn''t seemed to work yet (though it''s only been a day or two, so maybe it''ll take more time). Also, I can''t remove the "link" to this web service from all other crawled pages, because I''m pretty sure ASP.NET is including the link on any page that references the web service. I''m using this syntax to reference the web service:

<asp:ServiceReference Path="~/SomePath/SomeService.asmx" InlineScript="true" />


我怀疑将 InlineScript 设置为true会导致将Web服务的路径输出到HTML,所以我的下一步就是尝试将该属性设置为false.但是,我不确定是否可以,并且我不希望将其设置为false,因此,如果您有任何其他建议,我将不胜感激.


I suspect setting InlineScript to true is causing the path to the web service to be output to the HTML, so my next step will be to try setting that property to false. However, I am not sure that will work and I would rather not set it to false, so if you have any other recommendations I would appreciate it.

推荐答案

使用robot.txt文件添加到您的网站,并使用搜索引擎列表指定不应该被搜索引擎列出的网址

Use a robot.txt file to your website and specify url which should not be listed by search engines using this block

User-agent: *
Disallow: /SomePath/SomeService.asmx




有关更多详细信息,请参见页面

http://www.robotstxt.org/robotstxt.html [




For more details see the page

http://www.robotstxt.org/robotstxt.html[^]


使用AjaxToolkit控件NoBot控件
Use AjaxToolkit Control NoBot control


这篇关于从搜索引擎(Google)结果中删除Web服务(ASMX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆