Next.js Discord

Discord Forum

Protect email from bots in Next.js

Answered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
What are some of the best ways to protect the email address from spam bot crawlers in next.js.

I've seen some libraries like react-email-obfuscator but it does not have typescript support.

What would be some alternative methods or solutions.
Answered by Clown
I personally use cloudflare as my DNS so email obsfuction works by default.

Other alternatives that dont depend on a provider can be found on the internet like:
https://spencermortensen.com/articles/email-obfuscation/#text-display
View full answer

9 Replies

I personally use cloudflare as my DNS so email obsfuction works by default.

Other alternatives that dont depend on a provider can be found on the internet like:
https://spencermortensen.com/articles/email-obfuscation/#text-display
Answer
(do know that using some or most of these would take away from the ability to click on an email and launch your email client)
Nope
From what i could see/gather it turns the email into some gibberish for the bots/initial render
Sun bearOP
do I have to switch my domain to cloudflare as a provider to use this?
Yes you need to use cloudflare domain from what i know. Thats why i gave the other options
There definitely are other providers like cisco and stuff but i have never used them
Sun bearOP
thank you I will look into it