DEV Community

Discussion on: Protect Your Contact Information From Crawlers

Collapse
 
franky47 profile image
François Best • Edited

I usually let CloudFlare handle that for me, they inject a script that mangles mailto: links and only unmangle them in JavaScript.

For websites where CloudFlare is not desirable, I run a similar mangling/demangling algorithm that uses base64 encoding of the address, with some characters replaced and the final string reversed to avoid easy detection of bWFpbHRvOg (base64 for mailto:) at the start.

I found the technique here:
code.luasoftware.com/tutorials/jav...

Example:
github.com/franky47/penelopebuckle...

Collapse
 
bahe007 profile image
Bastian Heinlein

Thanks for sharing this solution, I really like it!