Google recaptcha not showing due to Cloudflare firewall rules (/wp-admin)

Hi Guys,

We have a Google recaptcha on the register page of our site. It is functioning properly.

After adding my site on cloudflare as well as adding firewall rules to block/challenge any access to (/wp-admin), I noticed that our Google recaptcha is not showing on our register page.

Here’s the Firewall rule we used: Tried both challenge & Block.
(http.request.uri.path contains “/wp-admin”) or (http.request.uri.path contains “/wp-login.php”) or (http.request.uri.path contains “/xmlrpc.php”)

After a few trials and error, it is confirmed that the block/challenge of “/wp-admin” is the main culprit. I noticed when I removed “/wp-admin”, the Google recaptcha will load.

How can I get the Google recaptcha to work while retaining the block of “/wp-admin” on cloudflare?

Please assist,

Regards
Lee

Good to know (seriously). I suspect that hard limits to wp-admin can cause problems, such as admin-ajax requests.

Are you seeing the event in the Firewall Log? There might be something in the request that you can add to the firewall rule as an exception.

1 Like

Hi!

Ya your right, I’m seeing a lot of requests from admin-ajax. I’ve updated the Firewall rule:

(http.request.uri.path contains “/wp-admin” and not http.request.uri.path contains “wp-admin/admin-ajax.php”)
or (http.request.uri.path contains “/wp-login.php”)
or (http.request.uri.path contains “/xmlrpc.php”)

It seems to work now, hopefully I’m not missing anything.

Cheers!
Lee

1 Like

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