{"id":30,"date":"2025-07-21T20:37:00","date_gmt":"2025-07-21T17:37:00","guid":{"rendered":"https:\/\/html-online.com\/articles\/?p=30"},"modified":"2025-11-20T10:54:18","modified_gmt":"2025-11-20T08:54:18","slug":"prevent-web-crawlers-stealing-email-addresses-website","status":"publish","type":"post","link":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/","title":{"rendered":"Prevent Web Crawlers From Stealing Email Addresses From Your website"},"content":{"rendered":"<p><strong>If you just simply publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect email addresses to send them spams, ads or viruses. This is why&nbsp;you have to make sure you never add your email to any website as plain text or link which is visible by robots.<\/strong><\/p>\n<h2>Demo<\/h2>\n<p><strong><a style=\"cursor: pointer;\" class=\"hiddenMail\" data-email=\"adminATwwweeebbbDOTcom\">Show Email<\/a><\/strong><br \/>\n<!--more--><br \/>\nGoogle has its own <a href=\"https:\/\/www.google.com\/recaptcha\/about\/\" target=\"_blank\" rel=\"external nofollow noopener noreferrer\">email reCaptcha<\/a> service which is considered uncomfortable by many and it seems to be unsupported on many mobile devices, not being responsive.<\/p>\n<p class=\"aligncenter\"><img decoding=\"async\" src=\"\/articles\/wp-content\/uploads\/2020\/01\/protect-website-email-crawl-spam.jpg\" alt=\"protect website email address crawler spam\"><\/p>\n<p>We need the most simple solution that fulfills all the requrements below:<\/p>\n<ul>\n<li>Safe &#8211; invisible for spiders<\/li>\n<li>Clickable &#8211; it triggers a <em>href=&#8221;mailto:&#8230;&#8221;<\/em> event<\/li>\n<li>Copyable &#8211; the text can be copied if someone just wants to save it<\/li>\n<li>Easy to use for visitor &#8211; don&#8217;t have to solve mathematical equations or decipher unreadable texts<\/li>\n<li>Easy to use for admin &#8211; can be set with a short code, no scripting required for every email instance<\/li>\n<\/ul>\n<p>We&#8217;ve come up with a solution that satisfies all.<\/p>\n<h2>Implementation<\/h2>\n<p>Use the HTML:<\/p>\n<pre style=\"background: #fff; color: #3b3b3b;\"><span style=\"color: #7a7a7a;\">&lt;<span style=\"color: #016cff;\">a<\/span> <span style=\"color: #963dff;\">class<\/span>=<span style=\"color: #666;\">\"hiddenMail\"<\/span> <span style=\"color: #963dff;\">data-email<\/span>=<span style=\"color: #666;\">\"ferencATdenesDOTcom\"<\/span>&gt;<\/span>\n    Show Email\n<span style=\"color: #7a7a7a;\">&lt;\/<span style=\"color: #016cff;\">a<\/span>&gt;<\/span>\n<\/pre>\n<p>The script that handles the event (jQuery required):<\/p>\n<pre style=\"background: #fff; color: #3b3b3b;\"><span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #a535ae;\">window<\/span>).<span style=\"color: #45ae34; font-weight: bold;\">load<\/span>(<span style=\"color: #ff5600;\">function<\/span> () {\n    <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #666;\">'.hiddenMail'<\/span>).on(<span style=\"color: #666;\">'click'<\/span>,<span style=\"color: #ff5600;\">function<\/span>(<span style=\"color: #a535ae;\">event<\/span>)\n    {\n        <span style=\"color: #a535ae;\">event<\/span>.preventDefault();\n        <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #0053ff; font-weight: bold;\">this<\/span>).off(<span style=\"color: #666;\">\"click\"<\/span>);\n        <span style=\"color: #ff5600;\">var<\/span> email <span style=\"color: #069; font-weight: bold;\">=<\/span> <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #0053ff; font-weight: bold;\">this<\/span>).attr(<span style=\"color: #666;\">\"data-email\"<\/span>).<span style=\"color: #45ae34; font-weight: bold;\">replace<\/span>(<span style=\"color: #666;\">\/AT\/<\/span>,<span style=\"color: #666;\">'@'<\/span>).<span style=\"color: #45ae34; font-weight: bold;\">replace<\/span>(<span style=\"color: #666;\">\/DOT\/<\/span>,<span style=\"color: #666;\">'.'<\/span>);\n        <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #0053ff; font-weight: bold;\">this<\/span>).removeClass(<span style=\"color: #666;\">\"hiddenMail\"<\/span>);\n        <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #0053ff; font-weight: bold;\">this<\/span>).html(email);\n        <span style=\"color: #069; font-weight: bold;\">$<\/span>(<span style=\"color: #0053ff; font-weight: bold;\">this<\/span>).attr(<span style=\"color: #666;\">\"href\"<\/span>,<span style=\"color: #666;\">\"mailto:\"<\/span><span style=\"color: #069; font-weight: bold;\">+<\/span>email);\n    });\n});\n<\/pre>\n<p>We need the preventDefault in order to prevent the href to trigger the link and let it just execute our script instead.<\/p>\n<p>After that we have to switch this event listener off because we do want the click to go through the second time the visitor <a href=\"\/articles\/jquery-click-event-touch-devices\/\">clicks<\/a> the link.<\/p>\n<p>The script replaces &#8220;AT&#8221; and &#8220;DOT&#8221; with the required characters and populates the corresponding sections of the link to make it work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you just simply publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect email addresses to send them spams, ads or viruses. This is why&nbsp;you have to make sure you never add your email to any website &hellip; <a href=\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Prevent Web Crawlers From Stealing Email Addresses From Your website&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,1,4,5,6],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-ai","category-articles","category-html","category-javascript","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Prevent Web Crawlers From Stealing Email Addresses<\/title>\n<meta name=\"description\" content=\"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prevent Web Crawlers From Stealing Email Addresses\" \/>\n<meta property=\"og:description\" content=\"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect\" \/>\n<meta property=\"og:url\" content=\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML Online\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/htmlcoding\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-21T17:37:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-20T08:54:18+00:00\" \/>\n<meta name=\"author\" content=\"HTML Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"HTML Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\"},\"author\":{\"name\":\"HTML Editor\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\"},\"headline\":\"Prevent Web Crawlers From Stealing Email Addresses From Your website\",\"datePublished\":\"2025-07-21T17:37:00+00:00\",\"dateModified\":\"2025-11-20T08:54:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\"},\"wordCount\":275,\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"articleSection\":[\"AI\",\"Articles\",\"HTML\",\"JavaScript\",\"jQuery\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\",\"url\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\",\"name\":\"Prevent Web Crawlers From Stealing Email Addresses\",\"isPartOf\":{\"@id\":\"https:\/\/html-online.com\/articles\/#website\"},\"datePublished\":\"2025-07-21T17:37:00+00:00\",\"dateModified\":\"2025-11-20T08:54:18+00:00\",\"description\":\"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect\",\"breadcrumb\":{\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/html-online.com\/articles\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prevent Web Crawlers From Stealing Email Addresses From Your website\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/html-online.com\/articles\/#website\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"name\":\"HTML Online Articles\",\"description\":\"Tips, tricks, tutorials\u2026\",\"publisher\":{\"@id\":\"https:\/\/html-online.com\/articles\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/html-online.com\/articles\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/html-online.com\/articles\/#organization\",\"name\":\"HTML Online\",\"url\":\"https:\/\/html-online.com\/articles\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"contentUrl\":\"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg\",\"width\":350,\"height\":350,\"caption\":\"HTML Online\"},\"image\":{\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/htmlcoding\/\",\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d\",\"name\":\"HTML Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g\",\"caption\":\"HTML Editor\"},\"description\":\"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/ferencdenes\/\",\"https:\/\/www.youtube.com\/@htmlg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Prevent Web Crawlers From Stealing Email Addresses","description":"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/","og_locale":"en_GB","og_type":"article","og_title":"Prevent Web Crawlers From Stealing Email Addresses","og_description":"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect","og_url":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/","og_site_name":"HTML Online","article_publisher":"https:\/\/www.facebook.com\/htmlcoding\/","article_published_time":"2025-07-21T17:37:00+00:00","article_modified_time":"2025-11-20T08:54:18+00:00","author":"HTML Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"HTML Editor","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#article","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/"},"author":{"name":"HTML Editor","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d"},"headline":"Prevent Web Crawlers From Stealing Email Addresses From Your website","datePublished":"2025-07-21T17:37:00+00:00","dateModified":"2025-11-20T08:54:18+00:00","mainEntityOfPage":{"@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/"},"wordCount":275,"publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"articleSection":["AI","Articles","HTML","JavaScript","jQuery"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/","url":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/","name":"Prevent Web Crawlers From Stealing Email Addresses","isPartOf":{"@id":"https:\/\/html-online.com\/articles\/#website"},"datePublished":"2025-07-21T17:37:00+00:00","dateModified":"2025-11-20T08:54:18+00:00","description":"publish an email address on a website you can expect tons of spam in the inbox. Web spiders crawl the sites all the time looking to collect","breadcrumb":{"@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/html-online.com\/articles\/prevent-web-crawlers-stealing-email-addresses-website\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/html-online.com\/articles\/"},{"@type":"ListItem","position":2,"name":"Prevent Web Crawlers From Stealing Email Addresses From Your website"}]},{"@type":"WebSite","@id":"https:\/\/html-online.com\/articles\/#website","url":"https:\/\/html-online.com\/articles\/","name":"HTML Online Articles","description":"Tips, tricks, tutorials\u2026","publisher":{"@id":"https:\/\/html-online.com\/articles\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/html-online.com\/articles\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/html-online.com\/articles\/#organization","name":"HTML Online","url":"https:\/\/html-online.com\/articles\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/","url":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","contentUrl":"https:\/\/html-online.com\/articles\/wp-content\/uploads\/2022\/06\/logo.jpg","width":350,"height":350,"caption":"HTML Online"},"image":{"@id":"https:\/\/html-online.com\/articles\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/htmlcoding\/","https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/channel\/UCn38Jw1sJzbjVHO95Zp0Sww"]},{"@type":"Person","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/019f9afa07f209153df0fecfc90b8c1d","name":"HTML Editor","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/html-online.com\/articles\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c1d8f5e7f1dc3e261766a96ac50c6a907fa5c236e87ab73379c57c9114e92cd?s=96&d=mm&r=g","caption":"HTML Editor"},"description":"In 2013, while wrestling with a mountain of client articles and an uncooperative CMS, I decided enough was enough. So, I created an online HTML editor purely out of necessity (and mild frustration). What began as a tool for my own sanity quickly evolved into a gift for the world\u2014or at least for anyone trying to avoid breaking their website's code. Since then, I've shared my tech notes on my blog, which serves as both a handy reference and a digital diary of the adventures and misadventures of a coder.","sameAs":["https:\/\/www.linkedin.com\/in\/ferencdenes\/","https:\/\/www.youtube.com\/@htmlg"]}]}},"_links":{"self":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":2,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":2150,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/posts\/30\/revisions\/2150"}],"wp:attachment":[{"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html-online.com\/articles\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}