Block PC users but not bot from accessing particular url

I just want to block (show 404 page) all the pc users from accessing a particular URL but not bots; this means users (including bots) coming from mobile + bots(not users) who access that URL from pc is allowed to access.

This isn’t really possible.
In order to show a 404 page, you need to run a worker in front of your website and have that filter out users. Finding bots is easy, but detecting PC vs mobile, not so much. Your worker would have to parse the user agent and compare it to ones you want to allow vs disallow.

what about directly blocking them?

That is slightly easier because you can create a WAF rule. The issue is still detecting mobile vs PC, you would still have to figure out the user agent situation.

Yes! that’s the issue detecting mobile and pc user

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