reCAPTCHA can add an abuse check to a website form, but installation has two parts. The browser displays the widget and collects a response, while the server verifies that response before accepting the submission. The steps below follow Google documentation and should be adapted to the form platform and privacy requirements that govern your site.
Choose the reCAPTCHA version
Confirm which reCAPTCHA product and version your form supports. Google documents v2 checkbox rendering and separate guides for score-based versions. Use the documentation that matches the key and integration you register.
The widget and verification flow depend on the version and key type you register. Confirm the form integration before writing code, and use the matching Google guide so the browser and server steps agree.
Record the selected version, domains, site key owner and verification endpoint in the implementation notes. Keep the decision current if Google or the form platform changes its supported options.
Register the site
Create the site entry in the reCAPTCHA administration area, select the supported domains and keep the site key and secret key in the approved credential store. Never place a secret key in browser code.
Review the domain list and credential ownership before moving from a test site to production. Remove test keys from temporary environments when the implementation is complete.
Register only the domains that should use the key and keep the secret key in the approved server-side credential store. Limit access to the people who maintain the form and its verification endpoint.
Load the API over HTTPS
Google documents loading https://www.google.com/recaptcha/api.js with async and defer. The page must load the API before the widget is rendered.
Load the documented script once and let the page finish the required dependencies before rendering the widget. Check the host content security policy and consent behavior because both can block a third-party script.
Use browser developer tools to confirm the API request and the widget response without exposing the secret key. Keep the script version and loading approach in the implementation record.
Place the widget
For automatic rendering, add a div with class g-recaptcha and the site key in data-sitekey inside the form. Follow Google guidance for explicit rendering when the form is inserted dynamically.
Place the widget near the form action and give it a clear label or supporting instruction. Preserve the entered values if a challenge fails so visitors do not have to repeat the entire form.
Test keyboard focus, mobile layout, error text and the disabled or enabled submit state. Confirm the site key belongs to the intended domain and is not confused with the server secret.
Verify before accepting
Send the response to your server and verify it with Google before treating the form as valid. Handle missing, expired or failed responses without losing the visitor input.
The browser response is only an input to server verification. The server should check the response with the selected service, handle expiration and failure, and accept the form only after the verification result meets the integration rule.
Log enough information to investigate failures without storing unnecessary personal data. Test replay, missing, expired and invalid responses as well as the successful path.
Test the complete form
Test keyboard and mobile use, successful and failed challenges, expired responses, error messages, consent, logging and the form destination. Confirm the integration does not expose credentials or store unnecessary personal data.
Test the complete path from page load to the final destination. Include keyboard, touch, screen-reader naming, consent, error recovery, downstream delivery and the user-visible response when verification fails.
Use a non-production key or approved test environment when possible. Have the form owner confirm that accepted submissions arrive once, rejected submissions do not create records and support staff can diagnose a failure.
Steps
-
Select the matching version
Confirm the reCAPTCHA version supported by the form integration and use its current Google documentation.
-
Register the site
Create the site entry, add the approved domains and store the site and secret keys securely. Keep the secret key server-side.
-
Load the API
Load the Google API over HTTPS with the documented async and defer attributes before rendering the widget.
-
Add the widget
For automatic rendering, place the g-recaptcha element inside the form with the site key in data-sitekey. Use explicit rendering for dynamically inserted forms.
-
Verify on the server
Send the response to your server and verify it before accepting the submission. Handle failure and expiry clearly.
-
Test and monitor
Test keyboard, mobile, success, failure, expiry, consent, logging and downstream delivery without exposing credentials or unnecessary personal data.
Frequently asked questions
Does reCAPTCHA stop every spam submission?
No service should be treated as a complete substitute for validation, rate limits and review. Verify responses server-side and monitor the form.
Where does the site key go?
Google documents the site key in the widget markup. Keep the secret key on the server and out of browser code.
How is the widget loaded?
Google documents loading the API over HTTPS and supports automatic or explicit rendering.
Do I need server-side verification?
Yes. The server should verify the response before accepting a submission.
Can I use this with an Ion form?
Check the form integration and approved implementation path for the specific Ion experience. Do not paste credentials into page content.
Last checked November 30, 2026.
Sources checked
- Google widget rendering – "You can display the reCAPTCHA widget either automatically using a simple HTML tag or explicitly with a JavaScript callback for more control." (checked 2026-11-30)
- Google site key markup – "The g-recaptcha tag is a DIV element with class name g-recaptcha and your site key" (checked 2026-11-30)
- Google HTTPS loading – "The script must be loaded using the HTTPS protocol and can be included from any point on the page without restriction." (checked 2026-11-30)
- Ion forms – "Quizzes Interactive White Papers E-books Calculators Assessments Interactive Infographics Look-Books Landing Pages Microsites Forms" (checked 2026-11-30)