Adding your email address to your site is helpful to your users. But, it also makes it available to spammers. Spammers can use scripts that visit websites and harvest the email addresses that are publicly available. This is called scraping.
This tutorial will show you a great way to mitigate scraping.
Since the notification varies from implementation to implementation, scrapers don't have a standard way of detecting those occurrences programmatically. Therefore, cloaking does a great job at mitigating scrapers while still being beneficial to users.
- Now, wherever you'd like an email to appear, you can use the following shortcode:
- [email email@example.com]
- Here's what it looks like in the front-end:
- The bottom part of the screenshot shows the HMTL that's generated.
- It's just standard HTML with a mailto link.
- As you can see, the mailto is now removed and the email address is now ciphered.
This small trick eliminates most scrapers.
- Use it wherever you want the notification to occur.