我可以使用 robots.txt 来禁止电子邮件地址吗?
在我网站的页脚中,我有一个电子邮件地址,地址为 info@mydomain。我想知道我是否可以禁止坏/好机器人索引该地址?
谢谢
In the footer of my website I have this e-mail adress that goes to info@mydomain. I want to know if it's possible for me to disallow bad/good robots to index this adress?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它不是。如果它在互联网上,他们就可以得到它。
It's not. If it's on the internet, they can get it.
我不这么认为。如果允许页面可索引,则电子邮件也将被吞噬。
但是,您可以采取措施确保机器人看不到它。如果他们不需要立即看到它,您可以使用验证码来保护它
或者您可以只需使用文本表示的图像即可。
您还可以使用 JS 路线来隐藏它。基本上只用JS就可以看到邮件
I don't think so. If the page is allowed to be indexable, the email will be gobbled up too.
However, you could take steps to make sure the bots don't see it. If it's not essential that they see it immediately you could use a CAPTCHA to protect it
Or you could simply use the image of the text representation.
You could also go the JS route to hiding it. Basically allow the email to be seen via with only JS
这不是 robots.txt 的功能,其预期功能是阻止 Google 抓取某些路径。您可以通过这种方式(简单的方法)来阻止电子邮件:
它仍然对人类可见,但会阻止一些垃圾邮件/搜索/爬虫/机器人使用它。最好的方法确实是使用 gd2 制作一个带有电子邮件字符串的小图像,并显示它。人类可以读取它并将其写在邮件程序中,但机器人通常不应该这样做。您仍然会有一些可以做到这一点的机器人。
This is not a feature of robots.txt, its intended feature is to stop Google from crawling certain paths. You can instead block emails in this sort of way (the easy way):
It's still visible to a human, but blocks some spam / search / crawlers / bots from using it. The best way really is to use gd2 to make a small image with a string of the email, and show that. A human can read it and write it down in their mail program, but a bot generally should not. You will still have some bots that can.