On some client sites selling in Mexico, we’ve been receiving a lot of traffic from China. Is there a way to block this? We tried using an app, but it didn’t work. I think those apps use JavaScript to redirect traffic once users reach the store. Has this happened to anyone else? Is there a solution?
Yes, Shopify apps are limited to using JavaScript to “block” or really just redirect browsers. An a bot can simply ignore the client side redirect, especially if it’s not actually emulating a full browser.
The best you can do is use Cloudflare as a WAF to block these requests at the domain level.
Cloudflare offers this guide on how to do that: Shopify · Cloudflare for Platforms docs
I haven’t had the time to try this myself, but in theory it should work.
1 Like