Guides & TutorialsTroubleshooting SimpleTroubleshooting reCAPTCHA Invalid Domain for Site Key

Troubleshooting reCAPTCHA Invalid Domain for Site Key

Symptom

Anywhere protected by a reCAPTCHA displays the error shown below, preventing forms from being submitted (Client Area Login, Admin Area Login, Checkout, etc):

Cause

This error is only displayed if the reCAPTCHA site keys configured in your WHMCS Admin Area do not have the domain name authorized. This most commonly occurs when WHMCS is migrated to a different domain name or subdomain.

Solution

Option 1: Adding the Proper Domain

The most effective way to resolve this is to add the correct domain name to the site key:

Visit https://www.google.com/recaptcha/admin and log into your Google account

Choose your correct Site Key from the dropdown list

reCAPTCHA

Click on Settings

reCAPTCHA

In the Domains section, add the correct domain name

reCAPTCHA

Optionally, you can remove the incorrect domain names at this time.

Option 2: Disabling Captcha

Another method for resolving this issue is to disable Captcha. This method is recommended only to be used if you no longer have access to your Google reCAPTCHA account.

This method requires executing a query to the database. Please ensure a full database backup is taken prior to execution of the query.

To disable Captcha from the database, open your favorite database manager. This can be the command line or a utility such as phpMyAdmin. This example will use phpMyAdmin.

Choose your WHMCS database by clicking on the name in the left navigation panel

v79.test.whmcs.rocks / localhost / v79whmcssupport_whmcs | phpMyAdmin 4.9.0.1

Next, click on the SQL tab

v79.test.whmcs.rocks / localhost / v79whmcssupport_whmcs | phpMyAdmin 4.9.0.1

Paste the query below into the Run SQL query box

UPDATE tblconfiguration SET value = '' WHERE setting = 'CaptchaSetting';

Press Go

Banners and Alerts

A successful message will appear. Captcha is now disabled and you will be able to log back into your WHMCS Admin Area to setup a new reCAPTCHA key.

v79.test.whmcs.rocks / localhost / v79whmcssupport_whmcs | phpMyAdmin 4.9.0.1