Display an email without getting spammed

What is the best and easiest way to put my email address on a web page and not get spammed?

I know you can create a fancy web form, but I don’t have time to program one of those.

My plan was just to put this in the page footer…

Have a question?  Contact us at: "support @ mydomain.com"

Is that sufficient, and can crawlers figure that is an email address and start spamming me?


I have not noticed any bots that crawl websites for email addresses lately, was more a thing 10 years ago. I would just use an image of the email address, if you do not want to take any risk. And use a unique email address for that link/image only.

Thanks, but I’m pretty sure spammers still crawl for email addresses. The question is, “How smart are they?”

And, yes, an image would work, but that isn’t very accessible.

I think using this would be safer, but it is also harder to spot and to read…

support AT mydomain DOT com

Plus it looks kinda dorky.

Hi there UpstateLeafPeeper,

I would suggest that you consider using
a contact form instead. :winky:

If this is not going to happen, then how
about something silly like this…

<html lang="en">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">

<title>Untitled document</title>

The internal CSS should be transferred to an external file
<link rel="stylesheet" href="screen.css" media="screen">

<style media="screen">
body {
    background-color: #f0f0f0;
    font: normal 1em / 1.62em sans-serif;
 .contactus {
    display: flex;
    flex-wrap: wrap;
    word-break: break-all;
.contactus div:nth-of-type(1),
.contactus div:nth-of-type(2) {
    margin-right: 0.5em;


 <div class="contactus">
   Have a question?
  	Contact us at:




You always seem to come up with the most ingenious solutions!

Looks cool, but is your code going to stop a crawler from crawling my webpage and assembling my email address and adding it to a database?

(I guess the logic is that since the text is split across several , div > that it would trip up a crawler?)

What does this code do…

.contactus div:nth-of-type(1),
.contactus div:nth-of-type(2) {
    margin-right: 0.5em;

Doesn’t make sense to me, especially since you have the class on an outer DIV and then plain DIVs inside of it?!

It puts grammatical spaces between the ? and the C
and between the : and the ". :winky:

Otherwise it would appear like this…

Have a question?Contact us at:"support@mydomain.com"



Okay, right, got it.

Back to my other question… Do you think this will prevent crawlers from getting my email?

I guess the answer is, “yes”, but I am still a tad skeptical.

I mean won’t a crawler ultimately just see what the user sees on the screen, i.e. an assembled email address?

I cannot answer that question. :unhappy:

You should really pose the question to a crawler controller. :rofl:

If in doubt about your safety, get one of the PHP gurus here
to code a suitable contact form for you. :winky:

That would be the professional route to take. :biggrin:



Well, I have coded my own “professional” contact form, but I don’t want to have to implement php and my simple HTML website that I am working on. (That and haven’t done PHP in a couple years and am not in the mood to get back into it for this mini project.)

But I agree that maybe some PHP programming types might have some ideas on your solution and how effective it is at stopping crawlers from doing bad things with my email address.

Just to be clear, the forums are not a free coding service.

Members are very willing to help anyone learn to do these things themselves, but are not here to do others’ work for them, so please don’t ask.


Hi there TechnoBear,

I am sorry about the confusion which my post has caused. :unhappy:

What I should have typed was…

“If in doubt about your safety, get one of the PHP gurus here
to help you code a suitable contact form.”

…which is what I meant. :winky:


Any advice you get in a forum such as this will suggest something that others, at least the other member, has already done. The more commonly it is done the more likely a spammer will want to defeat the trick.

Something I have done would be the equivalent of saying to contact support at this domain and hope that they can figure that out. Assuming that mydomain.com is the same as in the email address, there is no need to repeat it. And it would be more difficult for software to recognize that an email address is being described.


Why not a simple one line form input for their email address and a request submit button?

From experience a form opens a whole new can of worms. There are not just spammers out there but also people that simply love to be destructive and annoying. Even a simple form where they enter email address and click ‘contact me’ allows them to ask you to contact someone else - a bit like ordering a pizza delivery for someone that annoys you - or they can simply contact you multiple times and fill up your inbox.

Forms that allow people to send a message opens you up to code injection and you have to protect against that - and forms attract spam.

I use a contact form but probably 75% of the code is anti-spam and anti injection and even then you run the risk of missing or deterring valid enquiries.

I find that people do still scan for email addresses but simply making it a bit more difficult makes a big difference as you say ‘me at mydomain’ helps as does an image but some spammers have code that decrypts images. I find simply doing something different will help, like ‘Please contact John Smith @ our domain name’ goes a long way (and I mean the actual words ‘our domain name’ not the domain name itself) . If you do it in a clever way it is still clear to a person and not worth a spammer developing new code to interpret the real email address.

As a golden rule avoid using ‘maito’ and also avoid common email names like ‘contact’ or ‘sales’ or ‘info’ because spammers will try all these @yourdomain - use something like ‘welcome’ or ‘hello’ or ‘hi’ or ‘tell-me-more’

You will never avoid all spam but a bit of clever thinking will go a long way. You will still get spam from people you enquire to that then sell on email addresses and there is nothing to stop people manually typing your email address into a database for future use or sale.

Also analyse your spam - dont just chuck it in a spam folder or delete it, often the subject, content or sender email from the spam will give you valuable clues on how to block it.

Just for your info my contact form checks number of words in the content (many spams contain only one to three words) it also checks the time it takes to complete the form since a real user would take maybe 10 seconds or more whereas a robot will complete it in under 2 seconds. It also has hidden fields called ‘email’ and ‘comments’ which a robot will fill in but a person can’t. The Spam level is then calculated and if above a certain level is sent to a spam account with analytics on hidden fields completed and time taken to submit. I do not use captcha or re-captcha images as I feel this complicates things for the sender and can put them off enquiring. Even the thankyou message is tailored so if it is detected as spam - the thank you message comes from Stephen Pam - get it? - S Pam ! So even if it is flagged as spam the spammer does not know so can’t amend their algorithm.

This means make it easy and invisible for genuine people, my real inbox does not get clutterd, I can analyse the spam to tweak my detection rules and I can still read any spam with a low rating so I do not miss any valid enquiries.

Good luck !


Valid point, but that sorta ties into my implied question of, “To what length do you have to go to trick spammers in 2021?”

In the past, saying, “email us at support AT mydomain DOT com” was more than enough.

Is that true in 2021?

And what about @coothead’s fancy DIV flexbox approach?

Not ready to get back into PHP for this mini project is why.


I concur with your point that “Contact Us” forms are easier tan some imply here. (The last PHP contact us form I wrote was over 1,000 lines of code…)

So what are you thoughts on simply using:

support AT mydomain DOT com


support  @  mydomain.com

Is that enough for now?

It is something that we have also thought about for some time, but we have just set the spam filter a lot higher.

if you program in PHP at all, you could use this class:
I have used it for ‘many years’

I just noticed that PHP was not a possibility. Another trick is to use an icon pic for the @ (at) symbol since that is what bots look for first. You could size it so it was not really noticeable as anything but regular text, although I do not think it would honour the browser ‘change font size’ process. Of course, maybe this is the same as using a pic of the entire email address.