TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What is the safest way to put an Email address on my website in 2021?

11 点作者 filipo超过 4 年前

9 条评论

actionowl超过 4 年前
Using a contact form that sends you an email server-side is a good one, that way they never have your email (unless you respond).<p>I also had a static website at one point where I didn&#x27;t want to add server-side processing for a contact form so I stored the email address obfuscated in javascript like:<p><pre><code> [&quot;m&quot;,&quot;o&quot;,&quot;c&quot;,&quot;.&quot;,&quot;l&quot;,&quot;i&quot;,&quot;a&quot;,&quot;m&quot;,&quot;e&quot;,&quot;@&quot;,&quot;e&quot;,&quot;m&quot;].reverse().join(&#x27;&#x27;) </code></pre> and injected it into the page. It seems that most scraper bots don&#x27;t execute javascript and with it split into an array they likely won&#x27;t find it by scraping the js files either.
LinuxBender超过 4 年前
Assuming this is your personal website, a form with a captcha should suffice. Ensure the form limits the input to printable text and limit how often the form may be used by IP and globally. Captcha doesn&#x27;t need to be a third party. It can be a simple math problem or a simple logic question or even &quot;What is in the picture below?&quot; and have a picture of a horse. Why a form? So people don&#x27;t get your real email address and you have the option to only view the messages on your website at your leisure. Legit users will leak their contacts when they get malware on their system.
soulchild37超过 4 年前
I am assuming you want to deter bots from scrapping your website to get your email address and spam you.<p>I suggest using something like “you can reach me at filipo [at] this domain name.”
评论 #26026880 未加载
fariss超过 4 年前
Base64 encode it.<p>If someone wants to send you email, he should be able to decode your address.
评论 #26028052 未加载
评论 #26039355 未加载
jitendrac超过 4 年前
I will do following<p><pre><code> mailid&lt;img src=&#x27;at.png&#x27; alt=&quot;@&quot;&#x2F;&gt;mydomain.com </code></pre> then just skip creating at.png
DarrenDev超过 4 年前
Is this still an issue in 2021?<p>10-15 years ago I used to use all sorts of methods to prevent email addresses from being scraped, and I had 100s of spam emails a day to content with.<p>Nowadays I get maybe 2-3 spam emails a day and they&#x27;re never to the &#x27;info&#x27; or &#x27;support&#x27; emails that I occasionally post on websites.<p>I don&#x27;t think that this is a problem that needs fixing or requires any drastic preventative measures any more.
speedgoose超过 4 年前
I recently went with an SVG of the email address, with vectors and not text of course.
postit超过 4 年前
Is anyone still crawling emails in 2021?
评论 #26032281 未加载
therm0超过 4 年前
display your email address as an image
评论 #26027966 未加载