Skip to content

4. Spam prevention Recaptcha

Object edited this page Jun 22, 2024 · 1 revision

Atom CMS provides 2 different spam prevention methods, one being Cloudflare Turnstile and the other being Google Recaptcha. It's only possible to have one enabled at a time, and they're both free.

They both work great, but Turnstile is said to be a bit harder to bypass.

🔒️ Cloudflare Turnstile

To set up the cloudflare turnstile captcha, to avoid potential bots from mass spamming your hotel, you'll first have to go to https://www.cloudflare.com/products/turnstile/, sign-in or sign-up, next select your cloudflare site & copy the site & secret key to your .env file.

Next up head to webite_settings and set cloudflare_turnstile_enabled to 1

Once the steps above have been completed, Cloudflare turnstile will be enabled on more or less any forms within Atom CMS.

🔒️ Google ReCaptcha

To enable google recaptcha, head to webite_settings table in your database, here you'll find an entry with a key named google_recaptcha_enabled set this to 1 if you wish Google recaptcha to be enabled and 0 if you want it to be disabled.

Next up in your .env file you'll find GOOGLE_RECAPTCHA_SITE_KEY= and GOOGLE_RECAPTCHA_SECRET_KEY= this is where your site and secret key that Google provides, has to be placed, for your recaptcha to work properly.

If you don't have any recaptcha keys yet, head to https://www.google.com/recaptcha/admin/ and fill out the necessary fields to receive them.

You must select reCaptcha v2 and the "I'm not a robot" Checkbox, when selecting your recaptcha settings within google.

Once the steps above have been completed, Google recaptcha will be enabled on more or less any forms within Atom CMS.

Clone this wiki locally