Google reCAPTCHA

Hi,

I have been receiving heaps of spam recently on my website. I have noticed that the google reCAPTCHA has changed to v3 so that must be why.

I have registered my site with google and there are a few things I am told to do:

  1. Paste this snippet before the closing tag on your HTML template:
    I won’t show what it is but I added it using the plugin “Head, Footer and Post Injections”.

  2. Paste this snippet in the JavaScript callback for an action on your website.
    Not sure how to do this part. Are you able to help me with this?

  3. Use this in the HTML code your site serves to users.
    Not sure what to do here either

Let me know if you can help.

Thanks
Frank

Hello Frank,

Thanks for writing in!

I would highly recommend that you install “Insert Headers and Footers” plugin (https://wordpress.org/plugins/insert-headers-and-footers/).

  1. Insert the given code in the footer designated section by going to Settings > Insert Headers and Footers.

  2. Do the same as you did in #1.

  3. I am not sure which code it is. Could you please include the code in your next reply?

Best Regards.

Thanks for the reply.

Can you let me know how to show you details but have it hidden from others?

I have pasted both snippets as requested into the header field of the “inset headers and footers” plugin

I would like to show you want code I needed to add but only want it private… let me know how to do this please

Hello Frank,

Please install the “Insert Headers and Footers” plugin and then do the following:

  1. In Settings > Insert Headers and Footers, please insert the code in the secure note for the header.

  2. In Settings > Insert Headers and Footers, please insert the code in the secure note for the footer.

  3. The given html code should be added in Settings > Insert Headers and Footers > Header. This is for site ownership validation.

Hope this helps.

Thanks for the instructions. I have added the relevant snippets in the header and footer page and then gone to the following page to verify if it is working: https://www.google.com/recaptcha/api/siteverify

The details that come up are as follows:
{
“success”: false,
“error-codes”: [
“missing-input-response”,
“missing-input-secret”
]
}

Also I have cloudflare service so could that be the reason? If so, how do you suggest I refresh it?

Hi Frank,


​To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password


Thank you.

No problem. Details are in the secure note.

Hi Frank,

You need to insert your keys here

Please check the link below for your guide

Thanks

Thanks for the instructions.

I have completed the steps and tested it on the previous site I mentioned and it still gave the same response. Can you let me know if I need to do anything else like clear something in cloudflare or on wordpress?

Hi @fitloans,

In that case, please deactivate your cache plugin and pause your CloudFlare. They should be inactive while you’re working on your site so changes should appear instantly. Then test it again.

I also recommend Contact Form 7, I’m not sure how their integration to reCaptcha works.

Plus, the Contact Form 7 should implement the above google requirements automatically since it’s part of its integration.

Thanks!

Sorry but I am confused with your response. I have cleared the cache and I am already using Contact Form 7 which has been set up with the integration to reCaptcha.

I am thinking that maybe going to the url https://www.google.com/recaptcha/api/siteverify does not verify whether the page is set up correctly or not. I think I will just monitor it and see if I still get lots of spam in the next week. Thanks

Hi,

Yes, that’s correct, going to that url does not verify your site.

Please remove the codes you have added in Headers and Footers, by adding your keys in Contact Form 7 it will automatically integrate it for you.

Thanks

Thanks Paul. Sorry for wasting so much of your time going back and forth. Sounds easy so I will do it via Contact Form 7 in future and get rid of what I have already done in the headers and footers
Thanks

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.