hi everybody in this video we're going to cover some
methods for protecting the email address
on your website from nasty spiders and crawlers that would love to
do nothing more than to harvest your
address and start stuffing your inbox with spam
while most of us would never shoot down
the opportunity to get a
message from an adoring fan
or a potential client that wants to hire your services
most of us unless you really really
have nothing better to do with your life
most of us would rather not be inundated
with junk mail offers for fake mail-order brides or
magic pills that
promise to make you look like a body
builder by the end of the day
or fishing expeditions from some delirious huckster
in a basement in Siberia
pretending to be a billionaire Prince in Nigeria who
would love nothing more than to give you five million dollars
if only you'll give them your credit card information
now of course there's no completely foolproof
way to guarantee that your spam box will stay
crystal clean for eternity
but one way to ensure that it will be filled to
the brim is to include a plain text
email on your site
now sure maybe you're old school and you remember those days
when users would highlight and copy your email address
then paste it into their email client
but that's hardly the way anyone does it these days
even something
slightly inconvenient spells a massive
problem for your users in today's snap
judgment speed is everything world
not to mention how incredibly annoying this
would be to try and copy paste on a mobile device
plus there are nefarious web crawlers
that run around looking for email addresses in your code
so they can add it to their list for their spam bots
so after running my site on SEO site checkup
I can see that I've been flagged here
for having a plain text email in my sites HTML
spam harvesters come my way I'm open for business
so let's click how to fix to
access some general tips for this issue
so I can make my address available
to actual users and be contacted by potential friends and clients
but not by spam stirrers
now first note that the best way to go about
doing this is to use a contact form
and to use the post method within that form
this method keeps your email address
itself completely out of the equation
this is a bit more involved if you're building it manually
so I'll go ahead and cover this method later in the video
first let's look at some more options here
while it won't be a better experience for your users
in fact it will be even more slightly annoying
the quickest fix is to simply replace the
@ and dot symbols with space at space
and literally spell out the word dot
or do the same idea in brackets
Fast and Furious and this will help avoid most
though not all spam harvesters
if thoughts out there are combing through
your site's text to find email to or email at
then they might very well be
programmed to convert those ATS and coms
back into a Spammable format
and again this method is pretty inconvenient for
users since they'll have to manually
highlight copy paste and then fix those symbols
not ideal but at least now you know the
reason why you see that method pop up from time to time
one step up from this is to use the mail to hyperlink method
this will appear as a clean
easy to understand link to your site visitor
and with just one click their default email
client will launch so that they can quickly and easily write a message
or if they don't use an email client they
can right-click copy the address and paste it into their browser
this method is much much better for your
site visitor which is the most important thing of course
but unfortunately this does nothing to protect you from BOTS
scouring the far reaches of the Internet
to find as many mail twos as they can
but to go one step further with this you can do some
fancy trickery here and replace the @ and dot characters with text
then at an on-click event
that will substitute the symbols back in
a surefire way to avoid spam bots is to replace
your email address with an image of your email address
there's no way a spam bot is going to be able to decipher that
at least in today's world
but unfortunately it's also a surefire way
to annoy your site visitors
since they'll have to manually type in your address
not the end of the world and you
won't have people pounding the desk with their fists
but again this isn't totally ideal
a quick and effective fix though
may be something to consider if you're having real issues with email harvesters
and your overloaded with spam
something that will tide you over until you have
time to implement a more involved long term solution
another relatively easy method to implement
within your HTML code
is to obfuscate your email address
with encoded characters
so here my website's code instead of mail to
and my in my email address looking like this
it would look like this
of course for site visitors when they browse my actual website
they'll see whatever link I'd like them to see
such as shoot me an email here
now this is an entirely spam safe either
Google search engine and
other advanced spam harvesting BOTS
are able to re-encode this
but this will certainly help weed out a lot of the
lesser sophisticated email harvesting BOTS
and lighten the load on your spam filter
keep in mind that most though
again certainly not all email harvesters are pretty basic
a bit on the stupid side
so this is enough to avoid those
to get this encoding
we're simply converting the ASCII characters into decimal characters
you can do this easily by
googling email address encoder
will click on this first link
type in our email address
and encode
copy this converted text
and paste it to replace it in our HTML code
done
not a bad relatively simple solution
that won't take much time
another pretty good way of going about it is to replace
your email address in your HTML with a PHP script
so my email s link here
will direct to my mail handler PHP file
I'll thus need to create that mail handler PHP file
and include the following script
with my email address here
spam bots won't see the address
plus let's say I have this email us link on
all 16 pages of my site
if I need to change that email address
I just need to open up that PHP file and edit it once
and that will apply to all those 16 links across my site
there are also several ways to use CSS or JavaScript to
throw harvesters off the trail
generally speaking bots are usually focused on
combing the content of HTML
they usually don't bother with CSS or JavaScript files
so let's quickly look at some of the things we can do with CSS
for example in this case I have my email
address on my web page
and two visitors it looks exactly as you would expect
but taking a look under the hood here in my HTML
I've only got the @ symbol as the text
then I'm using data user and data domain
to refer to pseudo style elements
that come before and after that @ symbol
within my overall style element called email
and then in my CSS
I've got my email style
and after the text I'll be applying that style to
in this case the @ symbol
I'll use before and after to point them to data user and data domain
so in the end for my site visitors
they get exactly what they expect
but all the spam harvesters see is the @ symbol
the same idea can be applied to
reversing the text with CSS
or include some null spaces which we can remove
using display:none in the CSS
these CSS tricks should do a pretty good job of
weeding out most BOTS
although users won't be able to click on this link
and launch their email client
in each of these cases they'll need to copy and paste the email address
by using JavaScript there's a clever way to
encode and decode your email address
using wrote or rotate 13
this is a method used to encrypt letters
simply by rotating each letter forward by 13 characters
so an a becomes an N a B becomes an O
a C becomes a P and so on
the same principle is wrote v which is used for numbers
at wrote 13 comm you can type in any text
and have it encoded in an instant
then we'll use a JavaScript function
to decode it on our web page
the only downside is that java script is required
for this to work
but this should be plenty enough
trickery to evade those pesky spam bots
and finally let's cover the post method
of creating a contact form
which is generally the ideal solution to
evade email harvesters
while at the same time making it even easier
for your site visitors to reach out to you
no need to copy and paste your email address
bounce over to their email client
or another browser window or any of that
just pop in their email address so you can
contact them back
write their message
and voila
or you can even take this a
step further and create a contact form
that contains a drop-down menu
or maybe a checkbox that your site visitors can
tick to sign up for your newsletter now
I won't lead you through the code line
by line but you'll be able to find plenty of code
examples if you Google PHP post method contact form
but let me show you the basics of how this works
first we're using the post method to check
if the HTTP request is a form submission or not
then
we'll want to check up all the required data is there
or if we need to return an error
for example if someone hits the send button
but hasn't actually written any message
check to see if there's no error
set the date then create the email template
set out from header and enter in the actual
email address we want these messages to go to
then we'll close off this PHP section
all of this comes before the opening
head tag of your HTML
then in your HTML head section will have
the contact form itself
which you can style any way you like
the sky's the limit
this requires knowledge of CSS
and again there are too many possibilities to cover here
so I'll just leave it at that
then after the closing head tag
well every HTML body
and the HTML code to use the post action
two variables to save error messages upon failure
and finally some display text for the site visitor
once they send us a message through the contact form
in this case your message was sent
we'll get back to you ASAP Thanks
now essentially what this is doing
is setting up a forum for users to input data
that data is collected
then composed into an email and sent to the
configured email address
collect the data
validate the data
send an email
if you're using WordPress
there are loads of plugins out
there that will help you craft a contact form
or if you're not using WordPress
there are dozens upon
dozens of contact form solutions out there
a mixed bag of free or paid
if you're not comfortable running the PHP file
and using CSS to style you contact form
but of all the solutions to avoid spam harvesters
this post method is far
and above the most effective
feel free to check out our other videos
so you can keep fine-tuning and getting the most
out of your SEO
and click subscribe to stay updated with new tips and tricks
to get you to the top of the search engine
results pages