Why You Should Never Put Your Email Address Directly on Your Website
If you’ve ever had a website — or know someone who does — you’ve probably noticed something frustrating: the moment your email address goes live on a page, the spam starts rolling in. Not a trickle. A flood. Newsletters you never signed up for, phishing attempts, cold sales pitches, and worse.
This isn’t bad luck. It’s automated. And it starts within hours of your site going live.
What Are Spam Bots and Email Scrapers?
Bots are automated programs that crawl the web constantly, visiting millions of pages every day. Most of them are legitimate — Google’s crawler indexes your site for search, for example. But a significant portion are malicious or commercial scrapers looking for one thing: contact information they can harvest and sell.
An email scraper reads the HTML source code of your page and looks for patterns that match an email address — name@domain.com. It takes milliseconds to extract, log, and move on. Your address then ends up in a database that gets sold to spammers, phishing operations, and cold outreach services worldwide.
Phone numbers are harvested the same way. So are physical addresses.
Why “Just Using a Contact Form” Isn’t Enough
Many people assume that replacing an email address with a contact form solves the problem. It helps — but it doesn’t fully protect you, for two reasons:
- You still need to display your email somewhere for clients who prefer direct contact, or for trust signals. A business with no visible contact info looks suspicious.
- Your email address appears in the form’s reply-to and notification emails, which can still be harvested if your server-side handling is exposed.
The solution isn’t to hide your contact info entirely. It’s to display it in a way that humans can read, but bots cannot easily parse.
How Contact Info Obfuscation Works
The most effective technique for email addresses is JavaScript-based runtime assembly. Instead of writing your email address directly in the HTML — where any scraper can read it — the address is broken into pieces and assembled in the browser only when the page loads.
The HTML source code never contains info@yourdomain.com as a readable string. A bot reading the raw HTML sees nothing useful. A human visiting the page sees a perfectly clickable mailto link, because their browser runs the JavaScript and assembles the address in real time.
A similar approach works for phone numbers — displaying them as separate pieces that are joined visually, or rendering them as styled elements that look like text but aren’t stored as a plain string in the source.
Does It Actually Make a Difference?
Yes — significantly. Automated scrapers target the low-hanging fruit: raw email addresses sitting in plain HTML. The majority of them don’t execute JavaScript at all, because running a headless browser for every page they visit would be too slow and resource-intensive at scale.
Obfuscation won’t stop every sophisticated scraper — nothing will entirely. But it eliminates the bulk of automated harvesting that generates 80–90% of website-sourced spam.
Combined with a properly configured spam filter on your email server, it dramatically reduces the noise.
What About Google and Other Search Engines?
A common concern is: “If my email isn’t in the HTML, will Google not trust me?”
Google’s crawler does execute JavaScript, so it can see obfuscated contact information. Your Google Business Profile, your schema markup, and your contact page all still signal that you’re a legitimate, contactable business. Obfuscation does not harm your SEO.
In fact, the inverse is true — a site drowning in spam is less likely to have a well-maintained inbox, which means slower response times, missed enquiries, and ultimately worse business outcomes.
What We Do at Pixel Perfect Digital
Every website we build has email obfuscation built in by default. Your email address never appears as a plain string in our HTML output. We assemble it at runtime using JavaScript, and we use structured schema markup (JSON-LD) to communicate your contact information to search engines and AI answer engines in a controlled, bot-safe way.
This isn’t an add-on or an upgrade. It’s standard practice, because protecting your inbox is part of protecting your business.
If you have an existing website and you’re wondering whether your contact information is exposed, you can check yourself: right-click anywhere on your contact page and select “View Page Source”. Search for your email address. If it appears as plain text — yourname@yourdomain.com — it’s being harvested.
Want us to take a look? Get in touch and we’ll do a free review.