阻止googlebot调用ajax方法
Googlebot 不断尝试在我的网站上调用 ajax 方法。 例如:default.aspx/GetStuffWithAjax
问题是谷歌应该不可能调用这个方法,因为我在调用它之前用javascript检查查询字符串是否有id = xxxx。谷歌可以跟踪此查询字符串的任何地方都没有链接。
机器人是否有可能在我的 html 代码中扫描 PageMethods.GetStuffWithAjax,然后尝试调用 ajax 方法?我怎样才能阻止这种情况......有人吗?
Googlebot keeps trying to call ajax methods on my website.
For example: default.aspx/GetStuffWithAjax
The problem is that this method should be impossible for google to call since im checking with javascript if the querystring has id=xxxx before calling it. There is no link anywhere with this querystring that google could follow.
Is is possible that the bot scans for PageMethods.GetStuffWithAjax in my html code and then just tries to call the ajax method? And how could I prevent this.. Anyone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将
Disallow: /GetStuffWithAjax
作为一行放入域根目录下的robots.txt
文件中。Put
Disallow: /GetStuffWithAjax
as a line in yourrobots.txt
file at your domain's root.您可以使用
robots.txt
告诉Google(和其他好的机器人)不要去那里。检查此处:You can use
robots.txt
to tell Google (and other good bots) not to go there. Check here: