Register reCaptcha & Get Keys
1. Goto Google reCaptcha and log in using your Gmail id.
2. Now you will see a Register a new site page to create a captcha.
3. Enter Label. (You can give any value here just to identify the captcha in the future.)
4. Select reCaptcha type.
6. Type your domain name under Domains. (This restricts the use of reCaptcha out of your domain name, so no one can misuse your reCaptcha even if they know the key values. It also covers the subdomain so no need to enter the subdomain separately. Press Enter key or click plus icon to type more than one domain name.)
See: 10+ Most Common WordPress Mistakes to Avoid
7. Your primary email address must be the owner of the reCaptcha. If you want to have more than one owner, then you can the email address. If not, then skip this step.
9. Optional. Tick the Send alerts to owners box if owners need to get alerted for any problems with the site.
10. Click Submit button.
11. If registered successfully, you will get a site key and secret key. (Site Key is used to server reCaptcha box to the users whereas secret key helps to validate the user’s response between your site and reCaptcha.)
12. Copy both the site key and secret key. We will use the keys while the integration.
Client Side Integration
The Client-side is nothing but frontend integration where users can interact with the reCaptcha. After client-side integration, users can see the reCaptcha and able to click I’m not a robot tickbox.
See: Setup Amazon CloudFront CDN WordPress using W3 Total Cache
Change YOUR_SITE_KEY with your captcha site key.
Change https://spytm.local/captchaAPI.php with your PHP file name. We will create this PHP file in the server-side integration step.
Refer to Google’s official document for client-side integration.
Server Side Integration
Server-side integration is the actual validation process that validates the user’s captcha response with the Google reCaptcha server.
See: Learn Traffic vs Backlinks
Replace YOUR_SECRET_KEY with your captcha secret key.
Refer to Google’s official document for Server-side integration.